PHPackages                             zaghadon/laravel-social - 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. zaghadon/laravel-social

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

zaghadon/laravel-social
=======================

A full and simple Toolkit Package for instantly adding Social Features to Laravel Project \[Adapted From Miladimos\]

v1.0.1(3y ago)176MITPHPPHP &gt;=7.4|^8.0

Since Aug 27Pushed 3y agoCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Laravel social package
======================

[](#laravel-social-package)

A full and simple Toolkit Package for instantly adding Social Features to Laravel Project [Adapted From Miladimos](https://github.com/miladimos/laravel-social)

- [![Starts](https://camo.githubusercontent.com/344e02530c9b5738a3d30fe1c8cf2b39410bf6f964eeb4ae1f0f706198510b0a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7a61676861646f6e2f6c61726176656c2d736f6369616c3f7374796c653d666c6174266c6f676f3d676974687562)](https://github.com/zaghadon/laravel-social/forks)
- [![Forks](https://camo.githubusercontent.com/a4e78b5414704fe6a42d6d47b47031bb92be32aac54c6261bd2fb2c50e16791d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f7a61676861646f6e2f6c61726176656c2d736f6369616c3f7374796c653d666c6174266c6f676f3d676974687562)](https://github.com/zaghadon/laravel-social/stargazers)

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

[](#installation)

1. Run the command below to add this package:

    ```
    composer require zaghadon/laravel-social
    ```
2. Open your config/socials.php and add the following to the providers array:

    ```
    Zaghadon\Social\Providers\SocialServiceProvider::class,
    ```
3. Run the command below to install package:

    ```
    php artisan social:install
    ```
4. Run the command below to migrate database:

    ```
    php artisan migrate
    ```

Uses
----

[](#uses)

Depending on the Capabilities You want implemented, as the required traits to the right Models.

### Likeable Trait

[](#likeable-trait)

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Zaghadon\Social\Traits\Like\Likeable;

class Post extends Model
{
    use HasFactory,
        Likeable;
}
```

In the User Model:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Zaghadon\Social\Traits\Like\CanLike;

class User extends Authenticatable
{
    use HasFactory,
        CanLike;
}
```

### Commentable Trait

[](#commentable-trait)

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Zaghadon\Social\Traits\Comment\Commentable;

class Post extends Model
{
    use HasFactory,
        Commentable;
}
```

In the User Model:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Zaghadon\Social\Traits\Comment\Commentor;

class User extends Authenticatable
{
    use HasFactory,
        Commentor;
}
```

### Bookmarkable Trait

[](#bookmarkable-trait)

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Zaghadon\Social\Traits\Bookmark\Bookmarkable;

class Post extends Model
{
    use HasFactory,
        Bookmarkable;
}
```

In the User Model:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Zaghadon\Social\Traits\Bookmark\CanBookmark;

class User extends Authenticatable
{
    use HasFactory,
        CanBookmark;
}
```

### Followable Trait

[](#followable-trait)

In the User Model:

```
namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Zaghadon\Social\Traits\Follow\Followable;

class User extends Authenticatable
{
    use HasFactory,
        Followable;
}
```

### Methods

[](#methods)

In controllers you have these methods:

```
namespace App\Http\Controllers;

use App\Models\Post;

class PostController extends Controller
{
    public function index()
    {
        $post = Post::find(1);

        $post->likes // return all likes

    }
}
```

TODO
====

[](#todo)

- Document Every Available Methods and their Usage.
- Create a test framework to test each unit feature.

Capabilities \[\* Proposed, \*\* In Active Developement\]
---------------------------------------------------------

[](#capabilities--proposed--in-active-developement)

Like

Favorite \*

Tag \*\*

Category \*\*

Bookmark

Follow \\ Unfollow

Subscribe \*\*

Comment

Vote / Rate System \*

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Every ~0 days

Total

2

Last Release

1355d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/acdef01e80b714223fde31e0583d60b6a72ff390074bed8d760c5e51f56a6ad7?d=identicon)[zaghadon](/maintainers/zaghadon)

---

Top Contributors

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

---

Tags

laravellaravel-packagelaravel-packagesbookmarksubscribelikelumen packageslumen supportlaravel-commentlaravel-likeLaravel-Supportlaravel-followlaravel-sociallaravel-bookmark

### Embed Badge

![Health badge](/badges/zaghadon-laravel-social/health.svg)

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

###  Alternatives

[irazasyed/larasupport

Adds Laravel Package Support in Lumen.

130669.8k4](/packages/irazasyed-larasupport)[imanghafoori/laravel-nullable

A package to help you write expressive defensive code in a functional manner

151423.7k6](/packages/imanghafoori-laravel-nullable)[paxha/laravel-reportable

This Laravel Eloquent extension provides record according to dates using models.

111.2k](/packages/paxha-laravel-reportable)

PHPackages © 2026

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