PHP code example of hrupin / yii2-reviews

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

    

hrupin / yii2-reviews example snippets


php composer.phar 

'modules' => [
    'reviews' => [
        'as frontend' => 'hrupin\reviews\filters\FrontendFilter',
    ],
]

'modules' => [
    'reviews' => [
        'as backend' => 'hrupin\reviews\filters\BackendFilter',
    ],
],

 php yii migrate/up --migrationPath=@vendor/hrupin/yii2-reviews/migrations
 

php yii migrate/down --migrationPath=@vendor/hrupin/yii2-reviews/migrations

<?= hrupin\reviews\widgets\Reviews::widget([
    'pageIdentifier' => 'p_11'
]); 

<?= hrupin\reviews\widgets\Reviews::widget([
    'reviewsIdentifier' => 'categoryId',
    'pageIdentifier' => 'p_11',
    'reviewsView' => '/ad/reviews',
    'enableReviews' => true,
    'emailAuthor' => '[email protected]'
]); 


<?= \hrupin\reviews\widgets\ReviewsModal::widget([
    'pageIdentifier' => 'index'
]);