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

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

liquidstyle/laravel-likeable
============================

Traits for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' and 'wishlist' feature.

v2.2.6(7y ago)125MITPHPPHP &gt;=5.5.0

Since Sep 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/liquidstyle/laravel-likable)[ Packagist](https://packagist.org/packages/liquidstyle/laravel-likeable)[ Docs](https://github.com/liquidstyle)[ RSS](/packages/liquidstyle-laravel-likeable/feed)WikiDiscussions laravel-5 Synced today

READMEChangelog (9)Dependencies (5)Versions (24)Used By (0)

!!! NOT STABLE - DO NOT USE !!!

Laravel Likeable Plugin
=======================

[](#laravel-likeable-plugin)

!!! NOT STABLE - DO NOT USE !!! Trait for Laravel Eloquent models to allow easy implementation of a "like" or "favorite" or "remember" feature.

#### Composer Install (for Laravel 5)

[](#composer-install-for-laravel-5)

```
composer require liquidstyle/laravel-likeable "~2.0"

```

#### Install and then run the migrations

[](#install-and-then-run-the-migrations)

```
php artisan vendor:publish --provider="Liquidstyle\Likeable\LikeableServiceProvider" --tag=migrations
php artisan migrate
```

#### Setup your models

[](#setup-your-models)

```
class Item extends \Illuminate\Database\Eloquent\Model {
	use \Liquidstyle\Likeable\LikeableTrait;
	use \Liquidstyle\Likeable\FavoriteableTrait;
	use \Liquidstyle\Likeable\WishlistableTrait;
}
```

#### Sample Usage for LIKE

[](#sample-usage-for-like)

```
$item->like(); // like the item for current user
$item->like($myUserId); // pass in your own user id
$item->like(0); // just add likes to the count, and don't track by user

$item->unlike(); // remove like from the item
$item->unlike($myUserId); // pass in your own user id
$item->unlike(0); // remove likes from the count -- does not check for user

$item->likeCount; // get count of likes

$item->likes; // Iterable Illuminate\Database\Eloquent\Collection of existing likes

$item->liked(); // check if currently logged in user liked the item
$item->liked($myUserId);

Item::whereLikedBy($myUserId) // find only items where user liked them
	->with('likeCounter') // highly suggested to allow eager load
	->get();
```

#### Sample Usage for FAVORITE

[](#sample-usage-for-favorite)

```
$item->favorite(); // favorite the item for current user
$item->favorite($myUserId); // pass in your own user id
$item->favorite(0); // just add favorites to the count, and don't track by user

$item->unfavorite(); // remove favorite from the item
$item->unfavorite($myUserId); // pass in your own user id
$item->unfavorite(0); // remove favorites from the count -- does not check for user

$item->favoriteCount; // get count of favorites

$item->favorites; // Iterable Illuminate\Database\Eloquent\Collection of existing favorites

$item->favorited(); // check if currently logged in user favorited the item
$item->favorited($myUserId);

Item::whereFavoritedBy($myUserId) // find only items where user favorited them
	->with('favoriteCounter') // highly suggested to allow eager load
	->get();
```

#### Sample Usage for WISHLISTED

[](#sample-usage-for-wishlisted)

```
$item->wishlist(); // wishlist the item for current user
$item->wishlist($myUserId); // pass in your own user id
$item->wishlist(0); // just add wishlists to the count, and don't track by user

$item->unwishlist(); // remove wishlist from the item
$item->unwishlist($myUserId); // pass in your own user id
$item->unwishlist(0); // remove wishlists from the count -- does not check for user

$item->wishlistCount; // get count of wishlists

$item->wishlist; // Iterable Illuminate\Database\Eloquent\Collection of existing wishlists

$item->wishlisted(); // check if currently logged in user wishlisted the item
$item->wishlisted($myUserId);

Item::whereWishlistedBy($myUserId) // find only items where user wishlisted them
	->with('wishlistCounter') // highly suggested to allow eager load
	->get();
```

#### Credits

[](#credits)

- Robert Conner -  (Original Developer)
- Jaye E. Miller -

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 68.6% 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 ~71 days

Recently: every ~0 days

Total

23

Last Release

2689d ago

Major Versions

0.1.2 → 1.0.02015-02-15

0.2.0 → 1.0.12015-02-16

1.2.1 → v2.02018-12-27

PHP version history (2 changes)0.1.0PHP &gt;=5.3.0

1.2.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/417d7080331d3cc9168f79c111981ffb214c3c6f7da243ae4e29cbffa07be029?d=identicon)[liquidstyle](/maintainers/liquidstyle)

---

Top Contributors

[![rtconner](https://avatars.githubusercontent.com/u/334533?v=4)](https://github.com/rtconner "rtconner (48 commits)")[![thejayemiller](https://avatars.githubusercontent.com/u/2328208?v=4)](https://github.com/thejayemiller "thejayemiller (19 commits)")[![RomainSauvaire](https://avatars.githubusercontent.com/u/1195119?v=4)](https://github.com/RomainSauvaire "RomainSauvaire (2 commits)")[![liorocks](https://avatars.githubusercontent.com/u/534610?v=4)](https://github.com/liorocks "liorocks (1 commits)")

---

Tags

laraveleloquenttraitlaravel5wishlistlikelikeablelikable

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[cybercog/laravel-love

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

1.2k302.7k1](/packages/cybercog-laravel-love)[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)[cybercog/laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.

1.1k651.8k11](/packages/cybercog-laravel-ban)[cybercog/laravel-ownership

Laravel Ownership simplify management of Eloquent model's owner.

9126.6k3](/packages/cybercog-laravel-ownership)[devdojo/laravel-reactions

3529.7k](/packages/devdojo-laravel-reactions)[jamesmills/watchable

A package to allow your Models to become watchable by a User

685.5k](/packages/jamesmills-watchable)

PHPackages © 2026

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