PHPackages                             hkan/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. hkan/follow

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

hkan/follow
===========

7162PHP

Since Jan 8Pushed 11y ago1 watchersCompare

[ Source](https://github.com/hkan/follow)[ Packagist](https://packagist.org/packages/hkan/follow)[ RSS](/packages/hkan-follow/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Follow
======

[](#follow)

User follow system for Laravel 4.

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

[](#installation)

Add the following line to your `composer.json`'s `require` array.

```
"hkan/follow": "dev-master"

```

Migrate to database

```
php artisan migrate --package="hkan/follow"

```

Copy the following line to the `providers` array of `app/config/app.php`

```
'Hkan\Follow\FollowServiceProvider'

```

Add the trait to your `User` model.

```
use \Hkan\Follow\Traits\FollowTrait;

```

Usage
-----

[](#usage)

#### Follow and unfollow users

[](#follow-and-unfollow-users)

```
$user->follow($prettyGirl)
$user->unfollow($belieberGirl)

```

#### Check if following or being followed by someone

[](#check-if-following-or-being-followed-by-someone)

```
$user->isFollowing($someDude)
$user->isFollowedBy($creepyDude)

```

#### Followers and followings relations

[](#followers-and-followings-relations)

```
$user->followers()
$user->followings()

$user->follower_count // Shortcut for $user->followers()->count()
$user->following_count // Shortcut for $user->followings()->count()

```

#### Bonus: Most followed user(s)

[](#bonus-most-followed-users)

```
User::mostFollowed()->first() // Most followed user
User::mostFollowed()->take(10)->get() // Most followed 10 users

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2135597?v=4)[Hakan Aktas](/maintainers/hkan)[@hkan](https://github.com/hkan)

---

Top Contributors

[![hkan](https://avatars.githubusercontent.com/u/2135597?v=4)](https://github.com/hkan "hkan (5 commits)")

### Embed Badge

![Health badge](/badges/hkan-follow/health.svg)

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

###  Alternatives

[maatoo/mautic-referrals-bundle

This plugin enables referrals in mautic.

142.7k](/packages/maatoo-mautic-referrals-bundle)

PHPackages © 2026

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