An extension for generataring rule classes via gii.
The preferred way to install this extension is through composer:
Either run
php composer.phar require --prefer-dist r2am9d/yii2-rbac-rule
or add
"r2am9d/yii2-rbac-rule": "*"
to the require-dev section of your composer.json
file.
Once the extension is installed, simply modify your application configuration as follows:
return [
'bootstrap' => ['gii'],
'modules' => [
'gii' => [
'class' => 'yii\gii\Module',
'generators' => [
'rule' => [
'class' => 'r2am9d\rule\gii\Generator'
]
]
],
],
];
You can then access the generator through the following URL:
http://localhost/path/to/index?r=gii/rule
or if you have enabled pretty URLs, you may use the following URL:
http://localhost/path/to/index/gii/rule