The preferred way to install this extension is through composer.
Either run
php composer.phar require mdmsoft/yii2-admin "*"
or add
"mdmsoft/yii2-admin": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply modify your application configuration as follows:
return [
'bootstrap' => [
'admin',
...
],
'modules' => [
'admin' => [
'class' => 'mdm\admin\Module',
'allowActions' => [
'admin/*', // add or remove allowed actions to this list
]
]
...
],
...
'components' => [
....
'authManager' => [
'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
]
],
];
See Yii RBAC for more detail. You can then access Auth manager through the following URL:
http://localhost/path/to/index.php?r=admin
To use menu manager (optional). Execute yii migration
yii migrate --migrationPath=@mdm/admin/migration