Y
Y
yativ_sobb2016-04-04 05:29:30
Yii
yativ_sobb, 2016-04-04 05:29:30

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',
        ],
    ],
];

I have tried everything on the forums and even do it step by step, maybe they will help here

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2016-04-04
@kawabanga

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 question

Ask a Question

731 491 924 answers to any question