PHP code example of vova07 / yii2-start-rbac-module
1. Go to this page and download the library: Download vova07/yii2-start-rbac-module 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/ */
vova07 / yii2-start-rbac-module example snippets
'authManager' => [
'class' => 'yii\rbac\PhpManager',
'defaultRoles' => [
'user'
],
'itemFile' => '@vova07/rbac/data/items.php',
'assignmentFile' => '@vova07/rbac/data/assignments.php',
'ruleFile' => '@vova07/rbac/data/rules.php',
]
Yii::$app->user->can('admin');
php composer.phar