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

zing/laravel-like

zing/laravel-like is a lightweight Laravel package for adding like and unlike behavior to Eloquent models. Use traits and polymorphic relationships to let users like any model, check liked status, and retrieve like counts through a simple, expressive API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Engagement as a platform capability, not a per-feature rebuild. Likes, reactions, bookmarks/saves, follows, and subscriptions share one polymorphic interaction model. Once adopted, "add reactions to X" becomes a UI and configuration task rather than a new schema plus service — directly changing how many engagement features fit in a quarter.
  • Build vs. buy: favors adopt. The 1.0.0 tag is the first stable API surface, which is the usual threshold for depending on an OSS package in a production roadmap rather than a spike. The cost is a Composer dependency plus a thin internal adapter, versus roughly one to three engineer-weeks to design, build, test, and maintain equivalent polymorphic interaction tables, counters, and cleanup jobs.
  • Roadmap unblocking: enables social proof (like/reaction counts), personalization signals (saved or bookmarked items feeding recommendations), retention loops (follow/subscribe), and moderation inputs (report/hide) without standing up a new service per capability.
  • A data-model decision with downstream analytics impact. One interaction table keyed by interactable type and id is cheap to write and easy to query per object, but it becomes a high-volume, multi-tenant event table. Decide early whether interactions are system-of-record or an operational store mirrored into the warehouse; that choice drives reporting latency, retention policy, and storage cost.
  • Use cases that fit: community and forum products, SaaS with save/favorite/watchlist UX, marketplaces (watchlists, "notify me"), content sites (reactions, claps), and internal tools (subscribe to a record, follow a ticket).

When to Consider This Package

Adopt when:

  • The app is Laravel and Eloquent-centric, and interactions attach to multiple model types (posts, comments, products, users) — the polymorphic design is the main value.
  • You need several interaction types soon and want one consistent schema instead of five bespoke tables.
  • Your team is small and would rather own UI/UX differentiation than interaction plumbing.
  • You want a versioned upgrade path you can pin, with tests you can lean on.

Look elsewhere when:

  • Scale or latency requirements are extreme (millions of interactions per minute, real-time counters at the edge). Interaction writes then belong in a dedicated service with Redis or a stream; the package becomes a prototype only.
  • You need a real social graph (friend-of-friend, mutual follows, ranked feeds). A relational interaction table is a poor fit for graph traversal; use a graph store or a feed/ranking service.
  • You have strict audit, retention, or data-residency requirements a general-purpose OSS schema won't satisfy without forking.
  • The interaction semantics are core domain logic (e.g., billing entitlements tied to "subscription"). Don't encode revenue-critical state in a third-party table.
  • The package is single-maintainer and unproven at scale; 1.0.0 signals API stability, not operational maturity. If risk tolerance is low, vendor the code or wrap it behind an internal interface with an exit plan.

How to Pitch It (Stakeholders)

To executives: This is a small, free building block that lets us ship engagement features — likes, saves, follows, subscriptions — as a shared capability instead of rebuilding the same plumbing for each one. It has reached its first stable release, which makes it reasonable to depend on. Expect to save roughly one to three engineer-weeks on the first feature and more on each subsequent one, at the cost of a dependency we can pin and replace.

To engineering: Composer dependency, polymorphic Eloquent relations, one migration for the interactions table plus indexes. Wrap it in a thin internal service or adapter so domain code doesn't call package APIs directly, pin the major version, and add integration tests around counter updates and cascade deletes — that is where interaction packages typically leak. Plan indexes on interactable type and id, and define a retention/archival path from day one.

Risks to state plainly: 1.0.0 means the API has just stabilized; expect minor breaking changes before 2.0. It is a general-purpose schema, so anything with unusual semantics should stay in our domain. And interaction tables grow fast — the archival decision is ours, not the package's.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums