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
Poll Widget

Poll Widget Laravel Package

friendsofvictoire/poll-widget

A Laravel/PHP package that provides a configurable poll widget for your application. Define poll questions and options, render voting forms, and display results with minimal setup, making it easy to add lightweight polling to Blade views and existing Laravel projects.

View on GitHub
Deep Wiki
Context7

A drop-in poll widget for Laravel that lets you embed interactive polls and surveys in any Blade view with a single directive. It bundles the routes, controller, and Blade component needed to render questions, accept votes, and display live results—no front-end wiring required.

  • Simple <x-poll> / @poll Blade component
  • Configurable single- or multiple-choice answers
  • Built-in vote storage and result aggregation
  • Publishable config and views for full customization

Ideal for adding lightweight community feedback to existing Laravel applications.

Frequently asked questions about Poll Widget
Is friendsofvictoire/poll-widget a Laravel package?
No. friendsofvictoire/poll-widget is a Symfony bundle (WidgetPollBundle) built as an extension for the Victoire CMS. It registers a widget type against Victoire's WidgetBundle and depends on Symfony's dependency injection container, Twig rendering and Doctrine ORM entities. There is no Laravel service provider, no config file, no Blade views and no Eloquent model in the repository, so nothing in it is Laravel-facing.
Can I install poll-widget in a Laravel app with Composer?
You should not. The bundle's Composer constraints target the Symfony 2.8/3.0 era and PHP 5.5 to 7.0, so on a modern Laravel 10 or 11 project running PHP 8.1+ Composer will almost certainly fail on dependency resolution before autoloading is even attempted. Even if you forced it in, the Symfony kernel bootstrapping and Victoire widget registry it relies on do not exist inside a Laravel process. Treat the repository as reference source code rather than a dependency.
Which Laravel versions does this poll widget support?
None. The package has no Laravel version support at all, and its last release was 2016-10-07, which places it in the Symfony 2.8/3.0 era long before current Laravel majors. It is a Victoire CMS bundle, so the meaningful compatibility question is Symfony and PHP, not Laravel. Any Laravel framing of this package is a mismatch.
Why does poll-widget fail to autoload or conflict with Laravel dependencies?
Because the package expects Symfony's dependency injection container, Twig templating, Doctrine ORM with annotation-based entity mapping, and Victoire's widget discovery conventions. Laravel supplies its own container, Blade, Eloquent and view composers, so none of the bundle's service wiring or annotations resolve. Composer usually blocks the install on PHP or Symfony constraints first, and any forced install would fail at container boot rather than at autoload time.
How do I build a poll widget in Laravel without this package?
Clone the repository and read it as a specification instead of installing it. Extract the domain model: a Poll entity, option and choice records, a vote action and a results view, which is roughly 200 to 400 lines of logic. Rebuild those as Laravel migrations plus Eloquent models (Poll, PollOption, PollVote), a form request and controller action or a Livewire component for voting, and a Blade partial for displaying results.
Does poll-widget work with Symfony 4, 5 or 6 and PHP 8?
No. The bundle predates Symfony 4's bundle simplification and the Flex recipe system, and it assumes PHP 5.5 to 7.0 semantics, so it is not compatible with modern Symfony releases or with PHP 8 typed-property and Stringable changes. It has one star, zero dependents and no compatibility reports anywhere in the ecosystem, meaning no downstream project is verifying it against current runtimes. Assume incompatible until a strictly timeboxed spike proves otherwise.
What functionality should I extract from the bundle before porting it to Laravel?
Capture the schema for polls, options and votes, the uniqueness rules such as one vote per user, session or IP, and the results aggregation logic. Also note how multi-choice voting, anonymous voting and results gating are handled, because those behaviours decide whether a native port takes a day or a week. Those four things are the real requirement; the Symfony glue around them is disposable.
How do I prevent duplicate votes in a Laravel poll implementation?
Add a unique composite index on (poll_id, voter_key) so deduplication is enforced at the database layer regardless of application bugs. Derive voter_key from the authenticated user ID, or from a hashed session or IP value for anonymous voting. Catch the unique constraint violation on insert and return an already-voted response, and put Laravel's RateLimiter on the vote endpoint to blunt scripted abuse.
Is there a maintained Laravel alternative to this poll widget bundle?
There is no maintained Laravel-native successor to this specific bundle, and the original is archived in all but name with no dependents in the graph. For most projects a straightforward in-house build of three models, one migration, a controller or Livewire component and a cached tally clears the requirement at lower total cost than porting or vendoring. You can evaluate Laravel-native poll and voting packages against your exact behaviour needs, but do not expect the Victoire bundle to fit.
Is friendsofvictoire/poll-widget still maintained and safe for production?
No. The last release was 2016-10-07, it has one star and zero dependents, and no downstream project exercises it, so there are no compatibility reports and no CVE watchers tracking it. The one favourable signal is its MIT licence, which makes forking and vendoring legally clean if you genuinely need the source. For production, treat it as archived reference code and rebuild the poll logic natively in Laravel.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource