PHPackages                             wimil/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. [Database &amp; ORM](/categories/database)
4. /
5. wimil/followers

ActiveLibrary[Database &amp; ORM](/categories/database)

wimil/followers
===============

Follow and followers for laravel eloquent

1.0(4y ago)1909MITPHPPHP &gt;=7.0CI failing

Since Feb 27Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel Followers
=================

[](#laravel-followers)

follower system for laravel, one model can follow another model.

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

[](#installation)

### Required

[](#required)

- PHP 7.0 +
- Laravel 5.5 +

You can install the package using composer

```
$ composer require wimil/followers
```

Then add the service provider to `config/app.php`

```
Wimil\Followers\Provider::class
```

Publish the migrations file:

```
$ php artisan vendor:publish --provider="Wimil\Followers\Provider" --tag="migrations"
```

As optional if you want to modify the default configuration, you can publish the configuration file:

```
$ php artisan vendor:publish --provider="Wimil\Followers\Provider" --tag="config"
```

And create tables:

```
$ php artisan migrate
```

Finally, add the characteristic function in the model that can be followed and can also be followed:

```
use Wimil\Followers\Traits\Followable;

class User extends Model
{
    use Followable;
}
```

**Example**

```
$bob = User::find(1);
$alin = User::find(2);

$bob->follow($alin);
$alin->follow($bob);
$bob->follow([2, 'App\User']);
$alin->follow([1, 'App\User']);

$bob->toggleFollow($alin);
$alis->toggleFollow($bob);
$bob->toggleFollow([2, 'App\User']);
$alin->toggleFollow([1, 'App\User']);
```

Usage
-----

[](#usage)

### Can Follow

[](#can-follow)

```
use Wimil\Follow\Traits\CanFollow;

class User extends Model
{
    use CanFollow;
}
```

**Example**All available APIs are listed below.

```
$user = User::find(1);
$page = Page::find(1);

$user->follow($page);
$user->toggleFollow($page);
$user->unfollow($page);
$user->isFollowing($page);
```

### Can Be Followed

[](#can-be-followed)

```
use Wimil\Follow\Traits\CanBeFollowed;

class Page extends Model
{
    use CanBeFollowed;
}
```

**Example**All available APIs are listed below.

```
$user = User::find(1);
$page = Page::find(1);

$page->addFollower($user);
$page->deleteFollower($user);
$page->toggleFollower($user);
$page->isFollowedBy($user);
```

**If you want to have your own Follower Model create a new one and extend my Follower model.**

```
use Wimil\Followers\Model\Follower as BaseFollower;

class Follower extends BaseFollower
{
    // ...
}
```

and dont forget to update the model name in the config/followers.php file.

### Facade

[](#facade)

**you can also use the facade alias, you must include the facade alias in your config/app.php**

```
'Follow' => Wimil\Followers\Facades\Follow::class;
```

**Usage**

```
$bob = User::find(1);
$alin = User::find(2);

Follow::attach($bob, $alin);
Follow::attach($alin, $bob);
Follow::attach([1, 'App\User'], [2, 'App\User']);
Follow::attach([2, 'App\User'], [1, 'App\User']);

Follow::detach($bob, $alin);
Follow::toggle($bob, $alin);
Follow::exists($bob, $alin);
```

License
-------

[](#license)

MIT

created by wimil

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1540d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/406484ac42b37d258e184b26c32a2ff39e80a4716e81f33203732a05219ffb77?d=identicon)[wimil](/maintainers/wimil)

---

Top Contributors

[![wimil](https://avatars.githubusercontent.com/u/54213518?v=4)](https://github.com/wimil "wimil (3 commits)")

---

Tags

laravellaravel-followerslaravel-packageFollowFollowersfollowinglaravel-followlaravel followerssystem followers

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[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.

851266.9k2](/packages/multicaret-laravel-acquaintances)[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[rennokki/befriended

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

76292.2k1](/packages/rennokki-befriended)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[poing/earmark

Laravel package to generate values in a unique and customizable series.

10712.9k](/packages/poing-earmark)

PHPackages © 2026

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