Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Reactions Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on a deceptively simple primitive. A "like button" reads as a two-day ticket, but the durable cost is in the data model: polymorphic relations across multiple model types, per-user uniqueness and toggle idempotency, denormalized counters for sorting/display, a configurable reaction-type registry, and adding a new emoji later without a migration. This package is a candidate to collapse that table-stakes work into configuration.
  • Feature scoping for the engagement surface. Whether v1 ships a single 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.
  • Roadmap sequencing. Reactions are an upstream dependency for notifications ("X reacted to your post"), feed ranking, "most helpful" sorting, reputation/karma, and moderation signals. Committing to reactions now unblocks those bets; deferring keeps them blocked.
  • Use-case prioritization. Community posts and comments, LMS lesson feedback, review helpfulness voting, internal idea boards for feature prioritization, and support-article usefulness scoring. The same primitive serves all of these, which is the main argument for adopting a generic package over a bespoke likes table for one surface.
  • Whether reactions are UI sugar or a first-class signal. If they feed ranking or analytics, you need events, aggregation, and query ergonomics. If they are decorative, a much cheaper implementation is fine. This decision should be made before evaluating any package.
  • Data ownership. Decide whether reaction storage is core-domain (own the schema, own the migrations, accept the maintenance) or commodity (delegate to a dependency behind an adapter).

When to Consider This Package

Adopt when:

  • You are on a Laravel version the package explicitly supports, and the targets are Eloquent models.
  • You need reactions across more than one model type — that is where a polymorphic package beats a hand-rolled per-table solution.
  • Volume is moderate (interactive user-driven writes, not feed-scale ingestion), and Eloquent-level counting is acceptable.
  • The team is small and cannot spend a sprint owning table stakes; MIT licensing clears legal without review.
  • You can pin the version and wrap it behind your own interface.

Look elsewhere or build in-house when:

  • High write volume or ranked feeds. You need Redis-backed counters, async aggregation, and idempotent event streams. Row-level Eloquent counting will not carry the read path.
  • Non-trivial business rules: weighted reactions, karma, per-role limits, rate limiting, anti-abuse, or moderation workflows. These are product logic the package will not model.
  • Non-Eloquent targets, sharded/multi-tenant data, or cross-database reaction storage.
  • Low dependency-risk tolerance. At ~195 stars with a single maintainer and a young release history, this is unvetted in the broader ecosystem. Gate adoption on: a real test suite, CI, recent commit activity, responsive issue triage, a documented Laravel/PHP version matrix, and a clean migration-publish story. If any of those fail, stop.
  • You have not compared it to the incumbent. 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.
  • Real-time reaction UX (live counts, presence). No package in this category covers broadcasting; that is your own layer regardless.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource