overtrue/laravel-like
A Laravel package for adding like, unlike, and favorite functionality to Eloquent models. Simple traits let users like any model, check liked status, count likes, and query liked items through clean, expressive APIs.
likeable trait, a likes pivot table with duplicate prevention, like()/unlike()/toggle() verbs, and likers relations — in a few hundred lines. Unless engagement is a core differentiator, adopting it removes a sprint of undifferentiated work (migration, trait, uniqueness handling, relation wiring) from the roadmap.composer.json constraints that pin the major (e.g. ^5.4 until the platform moves) and expect every framework upgrade to force a package major bump.Adopt when:
isLikedBy) and the ability to list who liked something.Look elsewhere or build in-house when:
To executives: A small, free, actively maintained open-source component that gives us the standard "like" feature — the same interaction users expect from any social or content product — without building it ourselves. It's a low-cost way to test whether engagement mechanics move our retention or content metrics before we invest in a bespoke system. The main caveat is maintenance coupling: the newest version requires the newest Laravel, so upgrading it is tied to our platform upgrade roadmap rather than being an independent choice.
To engineering: Add the trait, run the migration, get like/unlike/toggle, uniqueness enforcement, and likers relations for free. v6.0.0 is a breaking, support-matrix-only release — Laravel 13 and PHP 8.3 minimum, no behavioural changes — so there is nothing to re-test beyond the platform bump itself. Pin the major version; treat the package upgrade as part of the Laravel upgrade ticket, not a standalone one. Know the boundary: it stores who liked what and lets you query it. Counting at scale, caching, rate limiting, abuse prevention, and notifications are ours to build, and should be scoped explicitly before we promise a "likes" feature to the business.
How can I help you explore Laravel packages today?