r2am9d/yii2-rbac-rule

Yii2 RBAC Rule Generator Extension for the Yii Framework

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

pkg:composer/r2am9d/yii2-rbac-rule

dev-master 2021-04-23 04:00 UTC

This package is auto-updated.

Last update: 2025-10-23 13:50:49 UTC


README

Yii2 RBAC Rule Generator Extension


An extension for generataring rule classes via gii.

Installation

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.

Usage

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