hkp22/laravel-reactions
Add reactions such as likes, loves, and more to any Eloquent model in your Laravel app. The package offers polymorphic, customizable reaction types, simple model traits, and a clean API for attaching, toggling, and counting reactions. Great for posts, comments, and social features.
like or a full set (like, love, dislike), whether reaction sets are global config or vary per surface (posts vs. comments vs. reviews), and whether users can react to their own content.likes table for one surface.Adopt when:
Look elsewhere or build in-house when:
cybercog/laravel-love has a larger install base and more field exposure. Switching cost later is not trivial once reaction queries and templates are threaded through the codebase — do the comparison before the first PR, not after.To executives: Engagement primitives are table stakes, and we have a recurring habit of rebuilding them per surface. This is an MIT-licensed, zero-cost component that removes roughly one to two sprints of undifferentiated work and gives us reactions on any model type from day one. The risk is contained by design: we pin the version, own the database migrations, and place it behind our own service interface, so replacing it later is a contained change rather than a rewrite. The real decision is not "which package" — it is whether reactions earn their screen real estate; we should hold the package to that standard and measure reaction rate per post and weekly engaging users, not adoption of the library.
To engineering: Do not hand-roll another polymorphic reactions table. Take the dependency, but take it on our terms: pin the version, publish and own the migrations, put it behind a ReactionService adapter so call sites never touch the package API directly, and require a smoke test covering toggle idempotency plus the aggregate queries we actually use. Verify the Laravel version matrix and test coverage before the first merge. Treat it as replaceable from day one — and if the maintenance signals are thin, we build the 200-line version ourselves and move on.
How can I help you explore Laravel packages today?