PHPackages                             hypefactors/laravel-follow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hypefactors/laravel-follow

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hypefactors/laravel-follow
==========================

Laravel 9 Follow System for Eloquent models.

v9.0.0(2y ago)4918.8k↓88.2%6[2 issues](https://github.com/hypefactors/laravel-follow/issues)BSD-3-ClausePHPPHP ^8.1CI failing

Since Oct 26Pushed 2y ago4 watchersCompare

[ Source](https://github.com/hypefactors/laravel-follow)[ Packagist](https://packagist.org/packages/hypefactors/laravel-follow)[ Docs](https://hypefactors.com)[ RSS](/packages/hypefactors-laravel-follow/feed)WikiDiscussions 9.x Synced today

READMEChangelog (10)Dependencies (6)Versions (22)Used By (0)

Laravel Follow
--------------

[](#laravel-follow)

[![Build Status](https://github.com/hypefactors/laravel-follow/workflows/Tests/badge.svg?branch=9.x)](https://github.com/hypefactors/laravel-follow/actions?query=workflow%3ATests)[![Software License](https://camo.githubusercontent.com/becdc2b9507bd88dbe951738738e9b382354163c97daafde6440cc7c075d3ca9/68747470733a2f2f706f7365722e707567782e6f72672f68797065666163746f72732f6c61726176656c2d666f6c6c6f772f6c6963656e7365)](https://opensource.org/licenses/BSD-3-Clause)[![Latest Version on Packagist](https://camo.githubusercontent.com/3760e4846059703cdf3f4569bf95ea4a54c84c38b924dbc439ac9397686550c0/68747470733a2f2f706f7365722e707567782e6f72672f68797065666163746f72732f6c61726176656c2d666f6c6c6f772f76657273696f6e)](https://packagist.org/packages/hypefactors/laravel-follow)[![Total Downloads](https://camo.githubusercontent.com/1f04f3ac3992e6fdb05de638ee3b1d79d72b9125af1bec52ccc3a461fa1d820f/68747470733a2f2f706f7365722e707567782e6f72672f68797065666163746f72732f6c61726176656c2d666f6c6c6f772f646f776e6c6f616473)](https://packagist.org/packages/hypefactors/laravel-follow)

Laravel 10 Follow System for Eloquent models.

This package is compliant with the FIG standards [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/) and [PSR-4](http://www.php-fig.org/psr/psr-4/) to ensure a high level of interoperability between shared PHP. If you notice any compliance oversights, please send a patch via pull request.

Version Matrix
--------------

[](#version-matrix)

VersionLaravelPHP Version9.x10.x&gt;= 8.18.x9.x&gt;= 8.07.x8.x&gt;= 7.36.x7.x&gt;= 7.2.55.x6.x&gt;= 7.24.x5.8.x&gt;= 7.13.x5.7.x&gt;= 7.12.x5.6.x&gt;= 7.11.x5.5.x&gt;= 7.0Installation
------------

[](#installation)

You can install the package via composer:

```
composer require hypefactors/laravel-follow

```

The package will be automatically registered.

Now you need to run the migrations:

```
php artisan migrate

```

Usage
-----

[](#usage)

### Preparing the Eloquent Models

[](#preparing-the-eloquent-models)

To allow an entity to be followed or to follow other entities, the corresponding models have to implement an interface and make usage of a trait.

Here's how we do it for a `User` and `Company` entity, where a user will be able to follow a company and the company will be able to be followed:

```
