在Yii2框架中使用rbac功能时,报错如何解决?

报错信息如下:
Exception 'yii\base\InvalidConfigException' with message 'You should configure "authManager" component to use database before executing this migration.'
已邀请:

zkbhj - 凯冰科技站长

赞同来自:

需要在配置文件中进行如下配置:
'components' => [
'authManager' => [
'class' => 'yii\rbac\DbManager' ,
'itemTable' => 'auth_item',
'assignmentTable' => 'auth_assignment',
'itemChildTable' => 'auth_item_child',
'ruleTable' => 'auth_rule',
]
]
参考链接:https://blog.51cto.com/coffee7ceo/1900947

要回复问题请先登录注册