1.在组件配置文件中增加:
'authManager' => [ 'class' => 'yii\rbac\DbManager', 'itemTable' => 'auth_item', 'assignmentTable' => 'auth_assignment', 'itemChildTable' => 'auth_item_child' ]
2.使用如下命令生成表结构:
yii migrate --migrationPath=@yii/rbac/migrations/
1.在组件配置文件中增加:
'authManager' => [ 'class' => 'yii\rbac\DbManager', 'itemTable' => 'auth_item', 'assignmentTable' => 'auth_assignment', 'itemChildTable' => 'auth_item_child' ]
2.使用如下命令生成表结构:
yii migrate --migrationPath=@yii/rbac/migrations/
转载于:https://www.cnblogs.com/wangqingyi/articles/4193353.html