PHPackages                             questocat/laravel-rally - 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. questocat/laravel-rally

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

questocat/laravel-rally
=======================

A followers system for laravel 5

v1.0.0(8y ago)5107MITPHPPHP &gt;=5.5.9

Since Apr 14Pushed 7y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (2)Used By (0)

laravel-rally
=============

[](#laravel-rally)

A followers system for laravel 5, Trait for Laravel Eloquent models to allow easy implementation of a "follow" or "like" or "favorite" or "remember" or "subscribe" feature.

[![StyleCI](https://camo.githubusercontent.com/b656b364bf299b4fa05798c0ad3e897959d7a30b08ae17e6de6c2bf51b294ea6/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130353334313635342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/105341654)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8f1c0e38528f13f89c141542c3e2e0e29ef2367599bb882df63161acdc42a21e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f71756573746f6361742f6c61726176656c2d72616c6c792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/questocat/laravel-rally/?branch=master)[![Build Status](https://camo.githubusercontent.com/f367a69a1c4bdc22fece60ae9813aa4bad1a97182c76664350d3bfb01516d4a3/68747470733a2f2f7472617669732d63692e6f72672f71756573746f6361742f6c61726176656c2d72616c6c792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/questocat/laravel-rally)[![Packagist](https://camo.githubusercontent.com/a4b7a1d8377c4252b62962b12857454a352b488c7f58770dcbcadcffaf57247b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646f637472696e652f6f726d2e737667)](https://packagist.org/packages/questocat/laravel-rally)

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

[](#installation)

Via [Composer](https://getcomposer.org) to add the package to your project's dependencies:

```
$ composer require questocat/laravel-rally
```

First add service providers into the config/app.php

```
\Questocat\Rally\RallyServiceProvider::class,
```

Publish the migrations

```
$ php artisan vendor:publish --provider="Questocat\Rally\RallyServiceProvider" --tag="migrations"
```

Publish the config

```
$ php artisan vendor:publish --provider="Questocat\Rally\RallyServiceProvider" --tag="config"
```

Setup the model
---------------

[](#setup-the-model)

Add CanFollow Traits to your User model.

```
use Questocat\Rally\Traits\CanFollow

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

Add CanBeFollowed Trait to your Post model or Video model and more.

```
use Questocat\Rally\Traits\CanBeFollowed

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

Add CanFollow and CanBeFollowed feature trait into your User model:

```
use Questocat\Rally\Traits\Followable

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

Usage
-----

[](#usage)

##### CanFollow

[](#canfollow)

Follow and Unfollow users

```
$user->follow(1);  // App\User:class
$user->follow($user1);
$user->follow([1, 3]);
$user->follow(1, Post::class);

$user->unfollow(1);  // App\User:class
$user->unfollow($user1);
$user->unfollow([1, 2]);
$user->unfollow(1, Post::class);
```

Check if being followed by someone

```
$user->isFollowing(1);
$user->isFollowing($user2);
$user->isFollowing(2, Post::class);
$user->isFollowing($post, Post::class);
```

Toggle follow

```
$user->toggleFollow(1);
$user->toggleFollow($user2);
$user->toggleFollow([2, 4]);
$user->toggleFollow([2, 4], Post::class);
```

Following

```
$user->following;
$user->following()->get();    // It's the same thing as this
$user->following()->count();  // Get the total following
```

##### CanBeFollowed

[](#canbefollowed)

Check if following by someone

```
$user->isFollowedBy(3);
$user->isFollowedBy($user2);
```

Followers

```
$user->followers;
$user->followers()->get();    // It's the same thing as this
$user->followers()->count();  // Get the total followers
```

##### Followable

[](#followable)

Check if it is mutual follow

```
$user->isMutualFollow(1);
$user->isMutualFollow($user2);
```

Inspiration
-----------

[](#inspiration)

- [Rally](https://github.com/fenos/Rally)

License
-------

[](#license)

Licensed under the [MIT license](https://github.com/questocat/laravel-rally/blob/master/LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

2950d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ce15799177be83de6d4b3c35f56c3eb827dc01d6baf78dc1e23a9b9d2bc859e?d=identicon)[questocat](/maintainers/questocat)

---

Top Contributors

[![voocx](https://avatars.githubusercontent.com/u/8717817?v=4)](https://github.com/voocx "voocx (35 commits)")

---

Tags

favoritefollowlikeremembersubscribesubscribelikerememberFollowfavorite

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/questocat-laravel-rally/health.svg)

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

###  Alternatives

[christiankuri/laravel-favorite

Allows Laravel Eloquent models to implement a 'favorite' or 'remember' or 'follow' feature.

226471.2k5](/packages/christiankuri-laravel-favorite)[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)[php-mqtt/laravel-client

A wrapper for the php-mqtt/client library for Laravel.

228539.3k1](/packages/php-mqtt-laravel-client)[doublesecretagency/craft-upvote

Lets your users upvote/downvote, "like", or favorite any type of element.

1634.6k](/packages/doublesecretagency-craft-upvote)[risul/laravel-like-comment

Ajax based site wide like and comment system for laravel

1116.9k](/packages/risul-laravel-like-comment)

PHPackages © 2026

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