composer require mdmsoft/yii2-admin "~2.0"
return [ //...... 'modules' => [ 'admin' => [ 'class' => 'mdm\admin\Module', ], //...... ], 'aliases' => [ '@mdm/admin' => '@vendor/mdmsoft/yii2-admin', ], 'components' => [ //...... 'authManager' => [ 'class' => 'yii\rbac\DbManager', 'defaultRoles' => ['guest'], ], //...... ], 'as access' => [ 'class' => 'mdm\admin\components\AccessControl', 'allowActions' => [ //這裏是容許訪問的action,不授權限控制,先用'*'設置成所有開放 '*' ] ], //...... ];
/index.php?r=admin /index.php?r=admin/route /index.php?r=admin/permission /index.php?r=admin/role /index.php?r=admin/assignment