PHPackages                             skybluesofa/laravel-followers - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. skybluesofa/laravel-followers

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

skybluesofa/laravel-followers
=============================

This package gives Eloquent models the ability to manage their followers.

1.2.0(6y ago)6010.9k10MITPHPPHP &gt;=7.1.0

Since Sep 8Pushed 6y ago3 watchersCompare

[ Source](https://github.com/skybluesofa/laravel-followers)[ Packagist](https://packagist.org/packages/skybluesofa/laravel-followers)[ RSS](/packages/skybluesofa-laravel-followers/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

Laravel 5 Followers
===================

[](#laravel-5-followers)

[![Build Status](https://camo.githubusercontent.com/bc7dea3540d154875b243d27234579cb478adb6fa86df297a26ee44cb16bcf8e/68747470733a2f2f7472617669732d63692e6f72672f736b79626c7565736f66612f6c61726176656c2d666f6c6c6f776572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/skybluesofa/laravel-followers) [![Code Climate](https://camo.githubusercontent.com/60e2de2e27f316162d344c4357d126192fc39a2e4228d4125b23a2c97942361d/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f736b79626c7565736f66612f6c61726176656c2d666f6c6c6f776572732f6261646765732f6770612e737667)](https://codeclimate.com/github/skybluesofa/laravel-followers) [![Test Coverage](https://camo.githubusercontent.com/9c1db5b088c57f0155f09846794101076d84f6ed8831255607b6385433daf973/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f736b79626c7565736f66612f6c61726176656c2d666f6c6c6f776572732f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/skybluesofa/laravel-followers/coverage) [![Total Downloads](https://camo.githubusercontent.com/70074f4b7adbe566a64fe5e57e89e10b8660f6dccf2d7922ed072fd90cc85a46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b79626c7565736f66612f6c61726176656c2d666f6c6c6f776572732e7376673f7374796c653d666c6174)](https://packagist.org/packages/skybluesofa/laravel-followers) [![Version](https://camo.githubusercontent.com/2c2c82dade1419f6c1f69cd331351be6857b92f85e12945c99620f889a418a51/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b79626c7565736f66612f6c61726176656c2d666f6c6c6f776572732e7376673f7374796c653d666c6174)](https://packagist.org/packages/skybluesofa/laravel-followers) [![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE)

Gives Eloquent models the ability to manage their followers.

Models can:
-----------

[](#models-can)

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

Installation
------------

[](#installation)

First, install the package through Composer.

```
composer require skybluesofa/laravel-followers
```

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

```
'providers' => [
    ...
    Skybluesofa\Followers\ServiceProvider::class,
    ...
];
```

Publish config and migrations

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

```

Configure the published config in

```
config\followers.php

```

Finally, migrate the database

```
php artisan migrate

```

Setup a Model
-------------

[](#setup-a-model)

```
use Skybluesofa\Followers\Traits\Followable;
class User extends Model
{
    use Followable;
    ...
}
```

How to use
----------

[](#how-to-use)

[Check the Test file to see the package in action](https://github.com/skybluesofa/laravel-followers/blob/master/tests/FollowersTest.php)

### Methods

[](#methods)

#### Send a Follow Request

[](#send-a-follow-request)

Will trigger a `Skybluesofa\LaravelFollowers\Events\FollowRequest` event.

```
$user->follow($recipient);
```

#### Accept a Follow Request

[](#accept-a-follow-request)

Will trigger a `Skybluesofa\LaravelFollowers\Events\FollowRequestAccepted` event.

```
$recipient->acceptFollowRequestFrom($user);
```

#### Deny a Follow Request

[](#deny-a-follow-request)

Will trigger a `Skybluesofa\LaravelFollowers\Events\FollowRequestDenied` event.

```
$recipient->denyFollowRequestFrom($user);
```

#### Remove Follow

[](#remove-follow)

Will trigger a `Skybluesofa\LaravelFollowers\Events\Unfollow` event.

```
$user->unfollow($recipient);
```

#### Block a User

[](#block-a-user)

Will trigger a `Skybluesofa\LaravelFollowers\Events\FollowingBlocked` event.

```
$user->blockBeingFollowedBy($recipient);
```

#### Unblock a User

[](#unblock-a-user)

Will trigger a `Skybluesofa\LaravelFollowers\Events\FollowingUnblocked` event.

```
$user->unblockBeingFollowedBy($recipient);
```

#### Check if User is Following another User

[](#check-if-user-is-following-another-user)

```
$user->isFollowing($recipient);
```

#### Check if User is being Followed by another User

[](#check-if-user-is-being-followed-by-another-user)

```
$recipient->isFollowedBy($user);
```

#### Check if User has a pending Follow request from another User

[](#check-if-user-has-a-pending-follow-request-from-another-user)

```
$recipient->hasFollowRequestFrom($user);
```

#### Check if User sent a pending Follow request to another User

[](#check-if-user-sent-a-pending-follow-request-to-another-user)

```
$user->hasSentFollowRequestTo($recipient);
```

#### Check if User has blocked another User

[](#check-if-user-has-blocked-another-user)

```
$recipient->hasBlockedBeingFollowedBy($user);
```

#### Check if User is blocked by another User

[](#check-if-user-is-blocked-by-another-user)

```
$user->isBlockedFromFollowing($recipient);
```

#### Get a single friendship

[](#get-a-single-friendship)

```
$user->getFriendship($recipient);
```

#### Get a list of all Friendships

[](#get-a-list-of-all-friendships)

```
$user->getAllFriendships();
```

#### Get a list of pending Friendships

[](#get-a-list-of-pending-friendships)

```
$user->getPendingFriendships();
```

#### Get a list of accepted Friendships

[](#get-a-list-of-accepted-friendships)

```
$user->getAcceptedFriendships();
```

#### Get a list of denied Friendships

[](#get-a-list-of-denied-friendships)

```
$user->getDeniedFriendships();
```

#### Get a list of blocked Friendships

[](#get-a-list-of-blocked-friendships)

```
$user->getBlockedFriendships();
```

#### Get a list of pending Friend Requests

[](#get-a-list-of-pending-friend-requests)

```
$user->getFriendRequests();
```

#### Get the number of Friends

[](#get-the-number-of-friends)

```
$user->getFriendsCount();
```

Friends
-------

[](#friends)

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

#### Get Friends

[](#get-friends)

```
$user->getFriends();
```

#### Get Friends Paginated

[](#get-friends-paginated)

```
$user->getFriends($perPage = 20);
```

### Events

[](#events)

These events are triggered during the lifecycle of following/unfollowing/accept/deny followers:

```
Skybluesofa\LaravelFollowers\Events\FollowingBlocked(Model $recipient, Model $sender);
Skybluesofa\LaravelFollowers\Events\FollowingUnblocked(Model $recipient, Model $sender);
Skybluesofa\LaravelFollowers\Events\FollowRequest(Model $recipient, Model $sender);
Skybluesofa\LaravelFollowers\Events\FollowRequestAccepted(Model $recipient, Model $sender);
Skybluesofa\LaravelFollowers\Events\FollowRequestDenied(Model $recipient, Model $sender);
Skybluesofa\LaravelFollowers\Events\Unfollow(Model $recipient, Model $sender);
```

To listen for and react to these events, follow the [instructions available in the Laravel Documentation](https://laravel.com/docs/7.x/events#defining-listeners).

Thank you
---------

[](#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.

Contributing
------------

[](#contributing)

See the [CONTRIBUTING](CONTRIBUTING.md) guide.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~638 days

Total

3

Last Release

2305d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

1.1.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/60324d72e7a3c7dea85699215cb194d3962647df1e860ae0ec1c6d53858e9a9b?d=identicon)[skybluesofa](/maintainers/skybluesofa)

---

Top Contributors

[![skybluesofa](https://avatars.githubusercontent.com/u/1657128?v=4)](https://github.com/skybluesofa "skybluesofa (36 commits)")[![acekyd](https://avatars.githubusercontent.com/u/4003538?v=4)](https://github.com/acekyd "acekyd (1 commits)")[![akiyamaSM](https://avatars.githubusercontent.com/u/12276076?v=4)](https://github.com/akiyamaSM "akiyamaSM (1 commits)")

---

Tags

followersfriend-requestsfriendshipfriendshipslaravel-packagelaravelfriendsFollowerseloqent

### Embed Badge

![Health badge](/badges/skybluesofa-laravel-followers/health.svg)

```
[![Health](https://phpackages.com/badges/skybluesofa-laravel-followers/health.svg)](https://phpackages.com/packages/skybluesofa-laravel-followers)
```

###  Alternatives

[multicaret/laravel-acquaintances

This light package, with no dependencies, gives Eloquent models the ability to manage friendships (with groups), verifications, and interactions such as: Likes, favorites, votes, subscribe, follow, ..etc. And it includes advanced rating system.

848278.2k2](/packages/multicaret-laravel-acquaintances)[rennokki/befriended

Eloquent Befriended brings social media-like features like following, blocking and filtering content based on following or blocked models.

76292.7k1](/packages/rennokki-befriended)[martbock/laravel-diceware

Diceware Passphrase Generator for Laravel

3268.9k](/packages/martbock-laravel-diceware)[orchestra/auth

Auth Component for Orchestra Platform

22108.6k3](/packages/orchestra-auth)[ingria/laravel-x509-auth

Laravel 5 Client Certificate auth middleware

375.6k](/packages/ingria-laravel-x509-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
