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

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

rtconner/laravel-likeable
=========================

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

3.2.0(4y ago)394388.0k↓12%47[10 issues](https://github.com/rtconner/laravel-likeable/issues)5MITPHPPHP ^7.3|^8.0

Since Sep 19Pushed 3y ago15 watchersCompare

[ Source](https://github.com/rtconner/laravel-likeable)[ Packagist](https://packagist.org/packages/rtconner/laravel-likeable)[ Docs](https://smartersoftware.net/packages/laravel-likeable-favorite)[ RSS](/packages/rtconner-laravel-likeable/feed)WikiDiscussions laravel-8 Synced 1mo ago

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

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

[](#laravel-likeable-plugin)

[![Build Status](https://camo.githubusercontent.com/377e61e1b9cdb39b752343103003618c76036278cdeb1d56a2c3f302a49c8df4/68747470733a2f2f7472617669732d63692e6f72672f7274636f6e6e65722f6c61726176656c2d6c696b6561626c652e7376673f6272616e63683d6c61726176656c2d38)](https://travis-ci.org/rtconner/laravel-likeable)[![Latest Stable Version](https://camo.githubusercontent.com/2168495b8e399ad51c4f60a6478c6e968881a336ce9395791fc82ae009aabedc/68747470733a2f2f706f7365722e707567782e6f72672f7274636f6e6e65722f6c61726176656c2d6c696b6561626c652f762f737461626c652e737667)](https://packagist.org/packages/rtconner/laravel-likeable)[![License](https://camo.githubusercontent.com/515e738c4aca7c1658d09ae4d1253b254891dfa54ad96902d63280b04c048a34/68747470733a2f2f706f7365722e707567782e6f72672f7274636f6e6e65722f6c61726176656c2d6c696b6561626c652f6c6963656e73652e737667)](https://packagist.org/packages/rtconner/laravel-likeable)

Trait for Laravel Eloquent models to allow easy implementation of a "like" or "favorite" or "remember" feature.

#### Composer Install

[](#composer-install)

```
composer require rtconner/laravel-likeable

```

#### Then run the migrations

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

```
php artisan migrate
```

#### Setup your models

[](#setup-your-models)

```
class Article extends \Illuminate\Database\Eloquent\Model {
	use \Conner\Likeable\Likeable;
}
```

#### Sample Usage

[](#sample-usage)

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

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

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

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

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

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

#### Credits

[](#credits)

- Robert Conner -

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity55

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 88% 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 ~135 days

Recently: every ~153 days

Total

19

Last Release

1819d ago

Major Versions

0.1.2 → 1.0.02015-02-15

0.2.0 → 1.0.12015-02-16

1.3.0 → 2.0.02019-09-22

2.0.0 → 3.0.02020-03-02

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

1.2.0PHP &gt;=5.5.0

3.0.0PHP &gt;=5.6.0

3.1.0PHP ^7.3

3.2.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/76a5f0095962be487b459678ea0ddb79ccbaf0e13a72c6ca50de0898e252275d?d=identicon)[rtconner](/maintainers/rtconner)

---

Top Contributors

[![rtconner](https://avatars.githubusercontent.com/u/334533?v=4)](https://github.com/rtconner "rtconner (66 commits)")[![EcoinTest](https://avatars.githubusercontent.com/u/153815470?v=4)](https://github.com/EcoinTest "EcoinTest (2 commits)")[![RomainSauvaire](https://avatars.githubusercontent.com/u/1195119?v=4)](https://github.com/RomainSauvaire "RomainSauvaire (2 commits)")[![antweny](https://avatars.githubusercontent.com/u/28085591?v=4)](https://github.com/antweny "antweny (2 commits)")[![liorocks](https://avatars.githubusercontent.com/u/534610?v=4)](https://github.com/liorocks "liorocks (1 commits)")[![cyrillkalita](https://avatars.githubusercontent.com/u/2401848?v=4)](https://github.com/cyrillkalita "cyrillkalita (1 commits)")[![maherelgamil](https://avatars.githubusercontent.com/u/6294478?v=4)](https://github.com/maherelgamil "maherelgamil (1 commits)")

---

Tags

laraveleloquenttraitlaravel5likerememberFollowfavoritelikeablelikablefavourite

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/rtconner-laravel-likeable/health.svg)](https://phpackages.com/packages/rtconner-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)[watson/rememberable

Query caching for Laravel

1.1k5.2M13](/packages/watson-rememberable)[cybercog/laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.

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

Implement reactions (like, dislike, love, emotion etc) on Laravel Eloquent models.

19564.6k](/packages/qirolab-laravel-reactions)[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)

PHPackages © 2026

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