PHP code example of elephantsgroup / eg-follow

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

'as access' => [
    'class' => 'mdm\admin\components\AccessControl',
    'allowActions' => [
        ...
        'follow/ajax/*',
        ...
    ]
]
'modules' => [
    ...
    'follow' => [
        'as frontend' => 'elephantsGroup\follow\filters\FrontendFilter',
    ],
    ...
]
'modules' => [
    ...
    'follow' => [
        'as backend' => 'elephantsGroup\follow\filters\BackendFilter',
    ],
    ...
]
<?= Follows::widget() 
<?= Follows::widget(['item' => $model->id])