1. Go to this page and download the library: Download orcsis/yii2-admin 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/ */
orcsis / yii2-admin example snippets
return [
'modules' => [
'admin' => [
'class' => 'orcsis\admin\Module',
...
]
...
],
...
'components' => [
....
'authManager' => [
'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
]
],
'as access' => [
'class' => 'orcsis\admin\components\AccessControl',
'allowActions' => [
'admin/*', // add or remove allowed actions to this list
]
],
];
'modules' => [
'admin' => [
...,
'controllerMap' => [
'assignment' => [
'class' => 'orcsis\admin\controllers\AssignmentController',
'userClassName' => 'path\to\models\User',
'idField' => 'user_id', // id field of model User
]
],
...
]
...
],
'modules' => [
'admin' => [
...,
'layout' => 'left-menu', // default null. other avaliable value 'right-menu' and 'top-menu'
],
...
],