PHP code example of elephantsgroup / eg-comment

1. Go to this page and download the library: Download elephantsgroup/eg-comment 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/ */

    

elephantsgroup / eg-comment example snippets

'as access' => [
    'class' => 'mdm\admin\components\AccessControl',
    'allowActions' => [
        ...
        'comment/ajax/*',
        ...
    ]
]
'modules' => [
    ...
    'comment' => [
        'as frontend' => 'elephantsGroup\comment\filters\FrontendFilter',
    ],
    ...
]
'modules' => [
    ...
    'comment' => [
        'as backend' => 'elephantsGroup\comment\filters\BackendFilter',
    ],
    ...
]
<?= Comments::widget() 
<?= Comments::widget(['item' => $model->id]) 
<?= Comments::widget([
    'service' => 1,
    'item' => $model->id,
    'color' => 'yellow',
    'view_file' => Yii::getAlias('@frontend') . '/views/comment/widget.php'
])