1. Go to this page and download the library: Download chiliec/yii2-vote library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chiliec / yii2-vote example snippets
'bootstrap' => [
'chiliec\vote\components\VoteBootstrap',
],
'modules' => [
'vote' => [
'class' => 'chiliec\vote\Module',
// show messages in popover
'popOverEnabled' => true,
// global values for all models
// 'allowGuests' => true,
// 'allowChangeVote' => true,
'models' => [
// example declaration of models
// \common\models\Post::className(),
// 'backend\models\Post',
// 2 => 'frontend\models\Story',
// 3 => [
// 'modelName' => \backend\models\Mail::className(),
// you can rewrite global values for specific model
// 'allowGuests' => false,
// 'allowChangeVote' => false,
// ],
],
],
],