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

Technical Evaluation

Architecture fit

  • overtrue/laravel-like is a narrow, single-purpose Eloquent extension: a HasLike trait, a Like model, and one migration providing polymorphic many-to-many "like/favorite" relationships between models.
  • Low architectural footprint: no service provider magic beyond config/migration publishing, no queue, cache, HTTP, or UI layer. It composes cleanly with existing domain models and does not impose a schema beyond its own table.
  • v6.0.0 does not change the architecture — it is a support-matrix release. Fit is therefore conditional on the host application running Laravel 13 on PHP 8.3+.

Integration feasibility

  • Adoption path is standard Composer + trait + migration publish; effort is measured in hours, not sprints.
  • The real constraint is environmental: PHP 8.3 minimum and Laravel 13 only (exclusive pin, not a range). Apps on Laravel 10/11/12 cannot consume v6 and must remain on 5.4.x.
  • CI and container base images must be updated before the dependency bump lands, otherwise install fails at the platform check stage.

Technical risk

  • High coupling risk: pinning a major version to exactly one Laravel major means this package will require a major upgrade every Laravel cycle. That is a recurring, predictable tax on the roadmap, not a one-off.
  • No feature delta: zero new capabilities in v6.0.0. The upgrade buys support status only, which weakens the business case if the platform is not already moving to Laravel 13.
  • Bus factor: single-maintainer package; the v5 branch's security-backport posture is unconfirmed.
  • Downgrade friction: once on v6, returning to v5 requires a Laravel downgrade — effectively one-way.

Key questions

  1. Is Laravel 13 on the roadmap, and in which quarter? If not within two quarters, this release is not actionable.
  2. What is our PHP baseline across app, CI, and production images — is 8.3 already universal?
  3. Do other Composer dependencies still pin Laravel ≤12, creating a resolution conflict?
  4. Is the published migration byte-identical to 5.4.1 (no schema change)? Confirm by diffing the vendor stub, not by trusting the changelog.
  5. Will the maintainer backport security fixes to 5.4.x, and for how long?
  6. Do we override the trait, model, or migration anywhere? Overrides are the most likely silent breakage point.

Integration Approach

Stack fit

  • Target: Laravel 13, PHP 8.3+, Eloquent-based models already using polymorphic relations.
  • No infrastructure prerequisites beyond the runtime; no external services, no async workers, no storage.

Migration path

  • If already on Laravel 13: composer require overtrue/laravel-like:^6.0, confirm the migration has already run (no schema change expected), run like/unlike regression tests, ship.
  • If on Laravel 11/12: take a deliberate decision — either hold at ^5.4 and pin explicitly in composer.json, or sequence the Laravel 13 upgrade first. Do not widen the constraint to ^5.4 || ^6.0 unless we are prepared to test both branches.
  • If on Laravel 10 or below: out of scope; freeze the current pinned version and record it as technical debt with a trigger condition (Laravel upgrade epic).
  • Pin exactly (^6.0) rather than *, and commit composer.lock. With this release cadence, floating constraints will break builds annually.

Compatibility

  • Verify the full dependency graph resolves under Laravel 13 before merging; a single conflicting package blocks the whole upgrade.
  • The testbench baseline change only affects our own test harness if we write integration tests against the package's internals — check orchestra/testbench version alignment in the test suite.
  • Re-verify any custom Like model, table name override, or config/laravel-like.php customization against the new major.

Sequencing

  1. Upgrade CI images and local/dev containers to PHP 8.3; update the CI matrix.
  2. Complete the Laravel 13 application upgrade (framework, then first-party and third-party packages).
  3. Bump overtrue/laravel-like to ^6.0 as part of that package sweep — not as a standalone PR.
  4. Run targeted regression on like/unlike/toggle, count queries, and any "most liked" reporting.
  5. Update internal dependency documentation and record the next review trigger (Laravel 14 announcement).

Operational Impact

Maintenance

  • Steady-state maintenance is minimal — the package is small and stable.
  • However, this release establishes an annual major-bump cadence tied to Laravel's release cycle. Budget one recurring ticket per year for the dependency sweep; it should ride along with the framework upgrade rather than stand alone.
  • Pin the version and treat upgrades as scheduled work, not incidental composer update side effects.

Support

  • Confirm in writing whether 5.4.x receives security backports and for how long. If it does not, running v5 is an accepted, time-boxed risk that should be recorded in the risk register with an owner and an expiry date.
  • Single-maintainer risk: for a package this small, the mitigation is trivial — the trait and migration are ~100 lines and easily vendored or forked if the project goes dormant. Note this as a viable contingency rather than a blocker.

Scaling

  • No scaling characteristics change in v6.0.0; the same query patterns and table shape persist.
  • Watch the usual pitfalls: N+1 on like counts (use withCount), missing composite index on (likeable_type, likeable_id), and no unique constraint to prevent duplicate likes from concurrent requests. Verify the shipped migration covers the index and unique key; if not, add a follow-up migration.
  • For high-traffic entities, cache aggregate counts rather than counting on read.

Failure modes

  • Install-time: Composer resolution failure from a conflicting Laravel ≤12 pin — surfaces immediately, low blast radius.
  • Runtime: fatal on PHP 8.2 or below if an environment is missed (staging vs. production drift is the realistic scenario).
  • Data: duplicate like rows if the unique index is absent and toggle logic races; silent integrity drift rather than an error.
  • Silent regression: locally overridden trait/model/migration diverging from the vendor version and being overwritten or ignored on upgrade.
  • Ecosystem: ecosystem lag — waiting on other packages to support Laravel 13 can strand the app mid-upgrade, which is the most likely schedule risk.

Ramp-up

  • Developer ramp-up is negligible: add the trait, call ->like(), done. Documentation needs are one internal page.
  • The actual effort sits with platform engineering (PHP 8.3 rollout, Laravel 13 upgrade) and QA (regression on interaction features). Estimate TPM attention at under a day for the package itself, contingent on the framework upgrade already being funded.
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.
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
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle