PHPackages                             oroalej/laravel-likeable - 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. oroalej/laravel-likeable

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

oroalej/laravel-likeable
========================

Reusable like module for Laravel

v1.0.0(3y ago)14MITPHPPHP ^8.0|^8.1

Since Sep 27Pushed 3y ago1 watchersCompare

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

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

Laravel Likeable Package
========================

[](#laravel-likeable-package)

### Composer Install

[](#composer-install)

```
composer require oroalej/laravel-likeable
```

### Run migration

[](#run-migration)

```
php artisan migrate
```

Usage
-----

[](#usage)

### Traits

[](#traits)

```
// Liker
use Illuminate\Foundation\Auth\User as Authenticatable;
use Oroalej\Likeable\Models\Traits\Liker;

Class User extends Authenticatable
{
  use Liker;
}

// Likeable
use Illuminate\Database\Eloquent\Model;
use Oroalej\Likeable\Models\Traits\Likeable;

Class Post extends Model
{
  use Likeable;
}
```

### API

[](#api)

```
$user = User::find(1);
$post = Post::find(1);

// Liker
$user->like($post);
$user->unlike($post);

// Likeable
$post->isLikedBy($user);
$post->unlikedBy($user);
```

### Getting Data

[](#getting-data)

```
// Liker
$user = User::find(1);
$user->liked(Post::class);
$user->liked();

// Likeable
$post = Post::find(1);
$post->likers(User::class);
$post->likers()
```

### Getting Count

[](#getting-count)

```
// Liker
$user = User::find(1);
$user->getLikeCountByType(Post::class);
$user->getTotalLikeCount();

// Likeable
// To avoid the n+1 issue, please make sure to include `with('likeableCounter')` when using `likes_count`
$post = Post::with('likeableCounter')->find(1);
$post->likes_count;

$result = Post::with('likeableCounter')->get();
$result->first()->likes_count;
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

1322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/803726eebaba9bf911252c5e58c484e651eb157489513298366edec5bf01b2bd?d=identicon)[oroalej](/maintainers/oroalej)

---

Top Contributors

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

---

Tags

laravellikerememberFollowfavoritelikeable

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/oroalej-laravel-likeable/health.svg)

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

###  Alternatives

[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)[christiankuri/laravel-favorite

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

226471.2k5](/packages/christiankuri-laravel-favorite)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)

PHPackages © 2026

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