0

When I execute the command yii migrate --migrationPath=@yii/rbac/migrations inside the main folder to activate the RBAC following the guide in the here and returns the following error "Exception 'ReflectionException' with message "Class db does not exist'in C:\Users\user\AppData\Roaming\Composer\vendor\yiisoft\yii2\di\Container.php:422 "

I have my db configuration correct inside of db.php file and its called in the web.php, and I can do other operations using the database. Also I added the 'authManager' => ['class' => 'yii\rbac\DbManager',], In web.php and console.php because I'm using the basic template. Don't know what's missing here.

changez
  • 77
  • 2
  • 11
  • `db` component must be also configured for console app, so make sure it's in `console.php`. – Bizley Jun 19 '17 at 11:02
  • Yes its configured correctly in that file. Also added the `'authManager' => ['class' => 'yii\rbac\DbManager',],` – changez Jun 19 '17 at 11:04
  • If you sure that u set up 'db' component, then your config file doesn't apply in yii.php – SiZE Jun 19 '17 at 12:48

0 Answers0