PHP code example of yii2mod / yii2-star-rating

1. Go to this page and download the library: Download yii2mod/yii2-star-rating 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/ */

    

yii2mod / yii2-star-rating example snippets


echo $form->field($model, 'attribute')->widget(\yii2mod\rating\StarRating::class, [
    'options' => [
        // Your additional tag options
    ],
    'clientOptions' => [
        // Your client options
    ],
]);

echo \yii2mod\rating\StarRating::widget([
    'name' => 'input_name',
    'value' => 5,
    'clientOptions' => [
       // Your client options
    ],
 ]);

php composer.phar