Gives Eloquent models the ability to manage followers.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Laravel 5 Followers

Build Status Code Climate Test Coverage Total Downloads Version Software License

Gives Eloquent models the ability to manage their followers.

##Models can:

  • Send Follow Requests
  • Accept Follow Requests
  • Deny Follow Requests
  • Block Another Model


First, install the package through Composer.

composer require skybluesofa/laravel-followers

Then include the service provider inside config/app.php.

'providers' => [

Publish config and migrations

php artisan vendor:publish --provider="Skybluesofa\Followers\ServiceProvider"

Configure the published config in


Finally, migrate the database

php artisan migrate

Setup a Model

use Skybluesofa\Followers\Traits\Followable;
class User extends Model
    use Followable;

How to use

Check the Test file to see the package in action

Send a Follow Request


Accept a Follow Request


Check if User can follow Recipient


Deny a Follow Request


Remove Follow


Block a User


Unblock a User


Check if User is Following another User


Check if User is being Followed by another User


Check if User has a pending Follow request from another User


Check if User sent a pending Follow request to another User


Check if User has blocked another User


Check if User is blocked by another User


Get a single friendship


Get a list of all Friendships


Get a list of all Friendships Paginated

$user->getFollowingList($per_page = 20);

Get Accepted Requests to follow


Get Pending Requests to follow


Get Denied Requests to follow


Get Blocked Requests to follow


Get a list of Following


Get a list of blocked Friendships


Get the number of Friends



To get a collection of friend models (ex. User) use the following methods:

Get Friends Following


Thank you

The basis of this code was garnered from Although it was a jumping off point, much of the code has been rewritten to allow for Following as opposed to Mutual Friendship.


See the CONTRIBUTING guide.