PHP code example of johnitvn / yii2-rbac-plus

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

    

johnitvn / yii2-rbac-plus example snippets

 
'userModelExtraDataColumls'=>[
    [
        'attributes'=>'created_at',
        'value'=>function($model){
            return date('m/d/Y', $model->created_at);
        }
    ]
]

'beforeCreateController'=>function($route){
    /**
    *@var string $route The route consisting of module, controller and action IDs.
    */    
}

'beforeAction'=>function($action){
    /**
    *@var yii\base\Action $action the action to be executed.
    */    
}

php composer.phar