Download the PHP package chiliec/yii2-vote without Composer
On this page you can find all versions of the php package chiliec/yii2-vote. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-vote
Vote for Yii2
A flexible and easy-to-use voting extension for Yii2 that provides anonymous voting functionality for any ActiveRecord models. Support likes/dislikes with aggregate ratings and guest voting capabilities.

Features
- 👍 Like/dislike voting system
- 👤 Guest and authenticated user voting
- 🔄 Optional vote changing
- 📊 Aggregate rating calculations
- 🎨 Customizable widgets
- 🏆 Top-rated models widget
- 🔍 SEO-friendly with rich snippets support
- 💾 Support for MySQL, PostgreSQL, and SQLite
Requirements
- PHP 8 or higher
- Yii2 2.0 or higher
Installation
Step 1: Install via Composer
Step 2: Configure Your Application
Add the following to your application configuration file (e.g., config/main.php):
Step 3: Run Migrations
Apply the database migrations to create the required tables:
Usage
Basic Vote Widget
Add the vote widget to your view:
Top Rated Widget
Display a list of top-rated models:
Advanced Configuration
Accessing Vote Data in Your Models
Once configured, your models will have access to voting data through the automatically attached behavior:
Manual Behavior Attachment
If you prefer to manually attach the behavior to specific models:
Documentation
For detailed documentation, see docs/README.md:
- Migration Guide from 2.* to 3.0
- Manual Behavior Configuration
- Sorting by Rating in Data Providers
- Overriding Views
- Customizing JavaScript Events
- SEO Rich Snippets
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Contributors
- chiliec - Maintainer
- loveorigami - Ideological inspirer
- fourclub - PK name fix in behavior
- yurkinx - Duplication JS render fix
- n1k88 - German translation
- teranchristian - Add popover to display messages
- Skatox - PostgreSQL support
Alternative Solutions
Looking for other voting solutions for Yii2?
- yii2-vote by hauntd - Vote widgets, like and favorite buttons
- yii2-vote by bigdropinc - Alternative voting implementation
Resources
License
yii2-vote is released under the BSD 3-Clause License. See LICENSE.md for details.
Support
If you find this extension useful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting issues
- 📝 Contributing improvements
- 💬 Sharing your experience
Made with ❤️ by the Yii2 community