I have created a RbacController in a module which extends yii\console\Controller in the following folder:
frontend/modules/foo/bar/commands/RbacController.php
The controller has the following namespace:
frontend\modules\foo\bar\commands\RbacController
It has 2 commands; actionAdd and actionRemove.
I’ve tried lots of things see bellow, but no success
php yii bar/rbac/add
Error: Unknown command "bar/rbac/add".
php yii foo/bar/rbac/add
Error: Unknown command "foo/bar/rbac/add".
php yii modules/foo/bar/rbac/add
Error: Unknown command "modules/foo/bar/rbac/add".
php yii frontend/modules/foo/bar/rbac/add
Error: Unknown command "frontend/modules/foo/bar/rbac/add".
How can I execute it?