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 Like Laravel Package

cslant/laravel-like

A Laravel package that adds like and favorite behavior to Eloquent models. Use traits and polymorphic relationships to like, unlike, toggle, count, and query liked items with minimal setup and clean syntax.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Shipping engagement loops without custom plumbing. The package now exposes a manager service plus Like and Love facades, so a squad can add reactions (like/dislike/love, undo variants, and toggle) to existing Eloquent models with a facade call or a trait method rather than designing a new interaction schema. That shortens the path from "engagement experiment" to "in a sprint."
  • Build vs. buy for a commodity capability. Reactions are solved, low-differentiation surface area. Adopting a maintained package (now with a testbench + Pest suite) is a defensible default; the alternative is spending engineering weeks on a feature that will not differentiate the product. This decision is now easier to justify because the release adds test coverage and fixes a config fallback bug that would have caused production misconfiguration.
  • Roadmap sequencing for social/commerce surfaces. The action set (including unDislike, unlove, toggle) maps cleanly to common product stories: upvote/downvote on community content, wishlist-style "love" on catalog items, reaction toggles on feeds, and reversible moderation actions. PMs can spec these as thin features instead of platform work.
  • Polymorphic-by-default modeling. Because it works via traits on "interactable" models, one integration covers many content types (posts, products, comments), which supports a roadmap where engagement is a cross-cutting capability rather than a per-feature rebuild.
  • Reduced config risk. The corrected fallback behavior for like.interaction_model and like.users.model means environment-specific configuration is less likely to fail silently — relevant for teams running multiple environments or multi-tenant setups.

When to Consider This Package

Consider adoption when:

  • The product needs discrete, user-authored reactions (like, love, dislike) on one or more Eloquent models, and the business requirement does not hinge on novel interaction semantics.
  • You are on a modern Laravel version with PHPUnit/Pest and can absorb a small dependency; the new testbench + Pest suite signals the maintainer is investing in verifiable behavior, which is the main signal a PM should care about in a small package.
  • You want the facade-or-trait ergonomics so feature teams can integrate without a shared platform ticket.
  • You need a fast, low-risk spike to validate whether reactions move a retention or engagement metric before committing platform capacity.

Look elsewhere (or plan for in-house work) when:

  • You need high-volume counters, ranking, or feed-ordering at scale. The release notes describe interaction actions, not aggregation, caching, or denormalized counts. Validate read-path performance and whether you must maintain your own tally tables.
  • You require weighted or multi-emoji reaction sets beyond the packaged enum, or reaction types that change frequently. The enum and facade surface imply a fixed vocabulary.
  • You need audit-grade history, moderation workflows, or analytics eventing out of the box — those likely remain your responsibility around the package.
  • You depend on deep customization of the underlying models, or your team extends internals. The LoveScope → LoveScopes rename is a small but real signal that internal trait names are not a stable contract; direct extension of internals carries upgrade cost.
  • Your platform is not Laravel/Eloquent, or you cannot accept community-maintained dependencies on a core engagement path.

Before committing, the PM should ask engineering for: index and query plans on the interaction table, current package maintenance activity and release cadence, an upgrade path from v2.0.0 (the trait rename), and whether existing user-interaction data needs a migration.

How to Pitch It (Stakeholders)

To executives: This is a small, focused Laravel package that lets us add "like," "love," and "dislike" reactions to any content type using tested, reusable code instead of building it ourselves. Version 2.1.0 is a genuine maturity step: it adds a clean service-and-facade interface, fixes a configuration bug that could have broken setups across environments, and — most importantly — ships an automated test suite. That combination lowers delivery risk and lets us run engagement experiments in days rather than weeks. Cost is a single dependency on a non-differentiating capability; the risk is manageable provided engineering confirms it handles our expected read volume, since the package does not appear to include built-in counting or ranking.

To engineering: The API is deliberately thin — a LikeManager service, Like/Love facades covering like, dislike, love, unlike, unlove, unDislike, and toggle, plus HasLike/HasLove traits for interactable models. Two things to note on upgrade: the LoveScope trait is renamed to LoveScopes (treat as a patch-level break if you extend it), and forgetInteractions* is now deduplicated into a shared ForgetsInteractions trait. Config fallback for like.interaction_model and like.users.model is fixed, so re-verify any environment overrides. Outstanding technical diligence: index strategy and query cost on interaction lookups, whether counts are your responsibility, and polymorphic coverage for our model set.

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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route