PHPackages                             r2am9d/yii2-rbac-rule - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. r2am9d/yii2-rbac-rule

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

r2am9d/yii2-rbac-rule
=====================

Yii2 RBAC Rule Generator Extension for the Yii Framework

010PHP

Since Apr 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/r2am9d/yii2-rbac-rule)[ Packagist](https://packagist.org/packages/r2am9d/yii2-rbac-rule)[ RSS](/packages/r2am9d-yii2-rbac-rule/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii2 RBAC Rule Generator Extension
==================================

[](#yii2-rbac-rule-generator-extension)

An extension for generataring rule classes via gii.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/):

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
-----

[](#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

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/83020513?v=4)[Ram](/maintainers/r2am9d)[@r2am9d](https://github.com/r2am9d)

---

Top Contributors

[![r2am9d](https://avatars.githubusercontent.com/u/83020513?v=4)](https://github.com/r2am9d "r2am9d (5 commits)")

### Embed Badge

![Health badge](/badges/r2am9d-yii2-rbac-rule/health.svg)

```
[![Health](https://phpackages.com/badges/r2am9d-yii2-rbac-rule/health.svg)](https://phpackages.com/packages/r2am9d-yii2-rbac-rule)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
