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

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for engagement primitives: This package delivers the standard "like" mechanic — a polymorphic 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.
  • Feature scoping for social/community surfaces: Useful for validating lightweight engagement (posts, comments, reviews, articles) before committing to a richer model. The package supports binary like/dislike, not multi-reaction sets or weighted scoring — so it's the right tool for a "thumbs up" hypothesis and the wrong one for an emoji-reaction or ranking-signal hypothesis.
  • Roadmap sequencing with framework upgrades: v6.0.0 is a support-matrix release only — Laravel 13 only, PHP 8.3 minimum, updated testbench/CI. There are no new features and no deprecations. This means the adoption decision is now coupled to your Laravel upgrade calendar: teams on Laravel 10–12 must stay on 5.4.x, and the "upgrade the package" work item only exists as a sub-task of "upgrade the framework."
  • Delivery risk assessment: The vendor's policy of dropping all older Laravel majors in each major tag keeps the surface small and the test matrix honest, but it also means you inherit a hard version pin. Plan for 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.
  • Operational decisions this surfaces (not solved by the package): denormalized like counts for feeds, caching/aggregation strategy, rate limiting and anti-abuse, notification-on-like, and moderation. Budget these separately — they are the actual cost centre behind a "likes" feature.

When to Consider This Package

Adopt when:

  • You're on Laravel 13 with PHP 8.3+ (for v6), or willing to pin 5.4.x while you finish your framework upgrade.
  • You need a single, well-understood engagement signal on one or a few Eloquent models, with per-user state (isLikedBy) and the ability to list who liked something.
  • Your write volume is modest — likes arriving at human/API-request rates, with counts read from the relation or your own cache. There is no built-in counter cache or queue-backed aggregation.
  • You want a small, MIT-licensed, actively maintained dependency from a well-known Laravel author rather than owning the code.

Look elsewhere or build in-house when:

  • You need multi-reaction support (emoji sets, per-reaction counts), weighted sentiment, or scoring/ranking primitives.
  • You need reactions to feed a ranking or recommendation system — you'll need your own aggregation, event stream, and caching layer regardless, which reduces the package to a thin persistence detail.
  • You need notifications, activity feeds, audit history, or moderation hooks on like events; the package does not emit domain events for these out of the box.
  • You're on Laravel ≤12 and cannot upgrade soon — do not force it; stay on the 5.4 line and note the divergence in your dependency register.
  • You require a vendor with a long-term support guarantee or backported security fixes across framework majors; this package's release model intentionally does not offer that.

How to Pitch It (Stakeholders)

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.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib