Answer the question
In order to leave comments, you need to log in
yii rbac/init Error unknow command?
yii rbac/init Error unknow command
here the garbage pops up in the console
Here I already created both in consol/config/main and common/config/main and still the same error
<?php
return [
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'authManager' => [
'class' => 'yii\rbac\PhpManager',
'defaultRoles' => ['user','pred','admin'], //здесь прописываем роли
//зададим куда будут сохраняться наши файлы конфигураций RBAC
'itemFile' => '@common/components/rbac/items.php',
'assignmentFile' => '@common/components/rbac/assignments.php',
'ruleFile' => '@common/components/rbac/rules.php'
],
'cache' => [
'class' => 'yii\caching\FileCache',
],
],
];
Answer the question
In order to leave comments, you need to log in
do you have a controller i.e. rbac/init?
Usually stored in the commands folder.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question