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
Voting Bundle

Voting Bundle Laravel Package

msalsas/voting-bundle

A Symfony bundle that adds a flexible voting system to your Doctrine entities. Let users upvote or downvote items anonymously or as registered voters, store votes via Doctrine, and display results with built-in Twig helpers.

View on GitHub
Deep Wiki
Context7

Provides voting/rating management for your Symfony project.

Frequently asked questions about Voting Bundle
Is msalsas/voting-bundle a Laravel package?
No. It is a Symfony bundle built around AppKernel registration, DI service definitions, Doctrine ORM mappings, and Twig helpers, so it does not plug into Laravel's service provider, Eloquent, or Blade contracts. Treat it as a reference implementation for the voting domain model rather than a Composer dependency for a Laravel app.
How do I install msalsas/voting-bundle?
In a Symfony project you would install it with Composer, register the bundle in AppKernel, and load its service and Doctrine configuration. The package is old and likely pins PHP and Symfony versions that fail on modern PHP 8.x stacks, so expect to fork and edit composer.json if you try it. For Laravel, do not install it; reimplement the vote entity and manager instead.
Does msalsas/voting-bundle support Laravel 10 or 11?
No. There is no Laravel service provider, no Eloquent integration, and no Blade support, so it cannot be used as a normal Laravel package. Laravel 10 and 11 also require modern PHP versions that the bundle's original constraints probably do not allow. Port the concepts into a HasVotes trait and a small VoteManager service if you need this behavior in Laravel.
What PHP and Symfony versions does msalsas/voting-bundle require?
The bundle is from an older Symfony era and most likely targets PHP 5.5 or 7.x with Symfony 2.7 or 3.x. That means composer install will usually fail on current PHP 8.x projects without a fork-and-edit of the package constraints. Check the original composer.json before assuming it will run on a modern Symfony or Laravel stack.
How does the bundle store votes for Doctrine entities?
It stores votes as Doctrine ORM entities, typically one row per vote containing the voter identity, the votable target identity, and a signed value. The target relation is usually polymorphic, such as votable type plus votable ID, which means there is often no database-level foreign key enforcing integrity. Review whether there is a unique constraint on voter plus votable and whether totals are counted at read time or denormalized.
Can users change an upvote to a downvote or remove a vote?
The bundle's voting manager is described as casting, removing, and switching votes, so those operations appear to be first-class behavior. You should still verify the exact service methods and database constraints in the source before relying on them. In a Laravel port, model this as an upsert or delete on the votes table rather than inserting duplicate rows.
Does msalsas/voting-bundle support anonymous voting?
Yes, the bundle is described as allowing anonymous votes as well as votes from registered users. Authentication and abuse controls are likely delegated to Symfony's security layer, so throttling and CSRF handling are not guaranteed by the bundle itself. If you port the pattern, decide explicitly how anonymous voter identity is represented and how duplicate anonymous votes are prevented.
How do I display vote totals in Twig?
The bundle includes built-in Twig helpers for rendering voting results, which is one of its Symfony-specific integration points. Those helpers will not work in Blade, so a Laravel version needs its own Blade component or view composer. The underlying data should still be a vote table that you can aggregate with COUNT or SUM queries.
Is msalsas/voting-bundle safe for production use?
It carries high technical risk because it is essentially abandoned, with very few stars, no known dependents, and no visible security-response process. The code is also likely pinned to old PHP and Symfony versions, so you would be maintaining a fork. The domain logic is small enough to reimplement safely in Laravel rather than adopting the bundle directly.
What is the best Laravel alternative to msalsas/voting-bundle?
There is no direct Laravel equivalent implied by this bundle. The practical alternative is to copy its design: a polymorphic votes table with voter, votable, and value columns; a HasVotes trait for Eloquent models; and a VoteManager service bound through a Laravel service provider. That gives you upvote, downvote, switch, and retract behavior without carrying Symfony bundle plumbing into your application.
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.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo