overtrue/laravel-vote
Add voting and rating to Laravel Eloquent models with overtrue/laravel-vote. It provides polymorphic vote relationships, upvote/downvote support, vote totals, and simple traits to attach voting to users and any model, making community feedback and ranking easy to implement.
Architecture fit. overtrue/laravel-vote is a thin, opinionated voting/rating layer for Laravel: a Vote model, a voter trait applied to the User (or any voter) model, and a votable trait (polymorphic morphMany) applied to any Eloquent model that should be votable. It is a persistence-and-relationship package, not a service or infrastructure dependency — it slots into the standard Laravel domain layer with no daemon, no queue worker, no external service. This makes it low-coupling and easy to reason about architecturally. The 4.0.0 release changes nothing about this contract; it is a platform-floor and tooling release only. Teams should read it as "the package now assumes a modern Laravel baseline", not "the package grew new capabilities."
Integration feasibility. High. Adoption is a composer require plus publishing/running a single migrations set (votes table with polymorphic votable columns and a voter foreign key). No configuration surface to speak of, no service provider binding to reason about beyond auto-discovery. The practical cost is dominated by the platform upgrade (PHP 8.2, Laravel 10+), not by the package itself.
Technical risk. Concentrated in three areas, in descending order:
PHP >= 8.2 and removal of Laravel 9. If our estate still runs PHP 8.0/8.1 or Laravel 9 anywhere this package is used, 4.0.0 is a hard blocker — Composer will refuse to resolve. This is the real decision point.13.x row of the support table as maintainer intent validated by a widened orchestra/testbench constraint, not as production evidence. It is a positive signal (the maintainer is tracking upstream early) but it should not be used to justify a Laravel 13 migration.Key questions.
^3.4) anywhere that will silently hold us on an unsupported branch once 3.x stops receiving updates?votable design still match our data model, or have we outgrown it (e.g. need weighted votes, vote reasons, audit history)?Stack fit. Requires Laravel 10.x–13.x and PHP 8.2–8.4. The CI matrix (8.2 / 8.3 / 8.4) confirms the package is actively tested against the PHP versions we should be targeting anyway. Any service on Laravel 10+ and PHP 8.2+ is a clean fit with zero architectural accommodation. Services below that floor are out of scope until their platform upgrade lands.
Migration path. Two-track, and they should not be conflated:
composer require overtrue/laravel-vote:^4.0 followed by a full test-suite run to confirm nothing depended on incidentally-removed behaviour. Expect zero or near-zero application code changes.phpunit.xml.dist was reworked for this, a useful reference), and CI matrix changes. Do not bundle this into a "bump the vote package" ticket.Compatibility. No database schema changes were signalled, so existing votes tables and stored data remain valid — the migration is data-safe. The one compatibility hazard is transitive: the 4.0.0 constraints on orchestra/testbench, phpunit/phpunit, and mockery were widened for the package's dev dependencies. If our application has hard pins on PHPUnit or Mockery (common in older test suites), Composer may surface conflicts that look like the vote package's fault but are actually test-tooling drift.
Sequencing.
^4.0 in a separate, trivially reviewable change; run the full suite and a smoke test of vote creation/toggle/aggregate queries.^3.x constraints with ^4.0 repo-wide so no service is stranded on an unsupported branch.Maintenance. Low and declining. The 4.0.0 changelog is almost entirely hygiene: Pint code style, actions/checkout v4, CI matrix refresh, PHPUnit 11/12 phpunit.xml.dist alignment. This is the signature of a package in maintenance mode — it will keep working, and it will keep accepting compatibility PRs, but it will not grow. Plan for the possibility that a future Laravel major is not supported promptly; the mitigation is that the package is small enough (a trait, a model, one migration) to vendor or absorb in-house if it goes stale.
Support. Single-maintainer, community-supported, no commercial SLA. Response to issues appears to be release-batched rather than continuous. For a low-criticality feature (ratings, likes, upvotes) that is usually acceptable. It becomes a genuine risk only if voting is load-bearing for a paid product surface or an algorithmic ranking system, in which case the trait should be wrapped behind an internal interface so the implementation is swappable.
Scaling. No change in 4.0.0, so the pre-existing profile holds: votes are row-per-vote with polymorphic indexes. Aggregate counts (sum, count) on a hot votable will eventually need denormalised counters or caching. Watch for the classic N+1 — eager-loading votes onto list endpoints instead of querying counts per row. The package also allows toggling/switching votes, which produces update-heavy write patterns on the votes table; that is a schema-indexing concern, not a package-version concern.
Failure modes.
overtrue/laravel-vote, root cause usually elsewhere.phpunit/mockery/testbench constraints colliding with application pins; manifests as test-suite breakage, not runtime breakage.Ramp-up. Minimal for engineers — the API is idiomatic Laravel traits and Eloquent relations, learnable in under an hour. The real ramp-up is organisational: getting the platform baseline (PHP 8.2+, Laravel 10+) agreed and sequenced across the estate, and establishing a standing practice of auditing pinned package constraints so that "supported versions" tables in third-party changelogs actually map onto what we run in production.
How can I help you explore Laravel packages today?