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

jcc/laravel-vote

Add upvote and downvote functionality to any Eloquent model in Laravel. jcc/laravel-vote offers a simple, flexible API for voting, with support for custom vote types, caching, and easy integration into existing models and queries.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for the engagement layer. This package still represents the "buy" side of a recurring decision: hand-roll a polymorphic votes table (migration, trait, unique constraint, aggregation scopes, toggle logic) or adopt an existing one. v2.0.0 changes the calculus favorably — a fresh major release with added tests signals the maintainer is active again — but a major version bump at four years of dormancy also means the integration cost estimate should be re-baselined, not carried over from the 1.x line.
  • Scoping social proof features. Upvote/downvote, like/dislike, and "was this helpful" remain cheap retention and quality-signal features. This package lets you scope them as a feature flag on an existing model rather than a mini-project, keeping the roadmap conversation at "this sprint" rather than "post-launch."
  • Feature prioritization and community input. If any part of the roadmap is driven by user-submitted ideas (feedback boards, feature request voting), user-based voting on models is the underlying primitive. That's a product-strategy decision, not just a technical one.
  • Ranking and content ordering. Votes become the input to sort order ("top," "best," "most helpful"). Decide early whether ranking is a core differentiator — if it is, own the scoring logic rather than inherit a generic count. The "new API" in v2.0.0 is worth inspecting before assuming it covers weighted or decayed scoring; the release notes don't say.
  • Moderation and trust signals. Downvote ratios and net scores feed abuse detection, review quality gates, and contributor reputation. Decide up front whether you need raw vote events (auditable, attributable) or just aggregate counts — this package is oriented toward the latter, and nothing in the v2.0.0 notes suggests that changed.
  • Dependency lifecycle risk as a roadmap input. A dormant-but-revived package reframes the exit plan: instead of "vendor it because it's dead," the plan becomes "pin to 2.x, watch release cadence, vendor on the next stall." That's a cheaper position to defend in a roadmap review than an unmaintained dependency.

When to Consider This Package

Consider it when:

  • You need generic voting across multiple model types (posts, comments, reviews, answers) and want a single trait-based implementation rather than per-model bespoke code.
  • Voting is a supporting feature, not a differentiator — time-to-market matters more than scoring sophistication.
  • Your stack matches what v2.0.0 actually supports. The prior release was March 2021; this one is a major version bump described only as code reorganization, new API, and added tests, with no stated Laravel/PHP support matrix in the notes. Verify 2.x against your current Laravel and PHP versions with a spike — a major bump is the likeliest place for framework-version modernization and for silent breakage.
  • You can absorb a one-time migration from 1.x conventions. "Code reorganized" plus "new API" is the classic signature of renamed namespaces, changed trait methods, or altered schema expectations. If you already ship 1.x anywhere, budget a real upgrade task, not a composer update.
  • You accept the revised maintenance profile: previously 133 stars, MIT, apparently single-maintainer, no release in ~4 years. v2.0.0 partially rebuts the abandonment concern and the added test suite raises confidence, but a single release after a long gap is evidence of life, not yet evidence of cadence. MIT still means the code surface is small enough to vendor or fork if the maintainer stops again.

Look elsewhere or build in-house when:

  • Votes drive a ranking algorithm you intend to tune (weighted votes by voter reputation, time decay, Wilson scores). A package will fight you; ~200 lines of your own code won't.
  • You need vote reasons, structured feedback attached to a downvote, or an immutable audit trail of vote events.
  • You're operating at a scale where cached counters, queue-based aggregation, or read replicas are required — evaluate the aggregation strategy before committing.
  • Your organization has supply-chain review requirements. v2.0.0 helps here (new tests, active maintenance signal) but a single-maintainer package with a four-year gap will still draw scrutiny; be prepared to frame it as "small vendored surface we can own," not "a dependency we trust implicitly."
  • Vote integrity and abuse resistance are load-bearing (public leaderboards, anything with incentive to game). You'll want control over rate limiting, deduplication, and anomaly handling.
  • The v2.0.0 reorganization touches internals you'd otherwise have extended directly. If you need to subclass or override package behavior, wait for docs/changelog detail rather than reverse-engineering a fresh major release.

Decision rule I'd apply: timebox a one-day technical spike against your current Laravel version, targeting 2.x specifically. Confirm it installs, the new test suite passes in your environment, and the trait still covers your model set after the reorganization. Note that the release notes are in Chinese and are three bullet points long — treat them as a heads-up, not documentation. If the spike is clean, adopt it behind an internal interface so the exit cost stays near zero and a future 3.x bump doesn't reach your call sites. If the spike shows breakage or the new API is undocumented, the build path still wins on total cost.

How to Pitch It (Stakeholders)

For executives: We can ship user voting — likes, upvotes, "helpful" signals on any content type — in roughly a day or two of integration instead of a one-to-two-week build. It's MIT-licensed and free, and small enough that we retain full control: if it's abandoned, we fork it and own the code. The maintenance picture just improved — the project shipped its first major release in about four years, adding tests and a new API — which removes the "dead dependency" objection, though a single release isn't yet a track record. I'm recommending a short technical validation before we commit, and wrapping it so we're never locked in. Low cost, low lock-in, reduced but non-zero risk.

For engineering: Trait-based, Eloquent-native, no external services, no infrastructure changes, no new operational surface — polymorphic user-to-model votes with an existing schema convention. v2.0.0 is a major bump: code reorganized, new API added, test coverage added. Treat the reorganization as a potential breaking change — assume renamed namespaces or changed trait methods until proven otherwise, and don't carry 1.x integration assumptions forward. The remaining concerns are the Laravel/PHP version fit for 2.x specifically and single-maintainer cadence; both answerable in a half-day spike that includes running the new test suite locally. Proposed approach: validate 2.x, then pin or vendor the dependency and expose it through a thin internal service so business logic never touches the package directly. If ranking becomes a differentiator, we replace the internals without touching call sites.

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.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log