PHPackages                             agusedyc/yii2-mimin - 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. agusedyc/yii2-mimin

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

agusedyc/yii2-mimin
===================

Simple RBAC Manager

v1.1.6(3y ago)044MITPHP

Since Nov 10Pushed 3y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (12)Used By (0)

Yii2 Mimin
==========

[](#yii2-mimin)

Simple RBAC Manager fo Yii 2.0. Minify of [yii2-admin](https://github.com/mdmsoft/yii2-admin) extension with awesome features

[![Latest Stable Version](https://camo.githubusercontent.com/c37048294011e03d52f03ee26743960affdb1d91f3f75808490c7fbb44c45005/68747470733a2f2f706f7365722e707567782e6f72672f61677573656479632f796969322d6d696d696e2f762f737461626c65)](https://packagist.org/packages/agusedyc/yii2-mimin) [![Total Downloads](https://camo.githubusercontent.com/86ef1be86f2a19b03e672020b2f051df377f61b183a82145ddbc24b37e09f5cd/68747470733a2f2f706f7365722e707567782e6f72672f61677573656479632f796969322d6d696d696e2f646f776e6c6f616473)](https://packagist.org/packages/agusedyc/yii2-mimin) [![Latest Unstable Version](https://camo.githubusercontent.com/d8c80e8a9c2e10a4a0d1651b2fb534de104675913f829d45a59e0d496190ff92/68747470733a2f2f706f7365722e707567782e6f72672f61677573656479632f796969322d6d696d696e2f762f756e737461626c65)](https://packagist.org/packages/agusedyc/yii2-mimin) [![License](https://camo.githubusercontent.com/13cc4d50c57e6f4aa538d8c279456c0495572e2edf83b34e9c243e130ee99adc/68747470733a2f2f706f7365722e707567782e6f72672f61677573656479632f796969322d6d696d696e2f6c6963656e7365)](https://packagist.org/packages/agusedyc/yii2-mimin)

Attention
---------

[](#attention)

Before you install and use this extension, then make sure that your application has been using the login authentication to the database. especially for yii basic template. Because without it, this extension will produce error and useless.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist agusedyc/yii2-mimin "~1.1.6"

```

or add

```
"agusedyc/yii2-mimin": "~1.1.6"

```

or add this for install last change

```
"agusedyc/yii2-mimin": "~1.*"

```

to the require section of your `composer.json` file.

Configuration
-------------

[](#configuration)

Once the extension is installed, simply use it in your code by :

in config

```
'as access' => [
     'class' => '\agusedyc\mimin\components\AccessControl',
	 'allowActions' => [
		// add wildcard allowed action here!
		'site/*',
		'debug/*',
		'mimin/*', // only in dev mode
	],
],
...,
'modules' => [
	'mimin' => [
		'class' => '\agusedyc\mimin\Module',
	],
	...
],
'components' => [
	'authManager' => [
		'class' => 'yii\rbac\DbManager', // only support DbManager
	],
],
```

Because this extension use 'yii\\rbac\\DbManager'as authManager, so You should migrate rbac sql first:

`yii migrate --migrationPath=@yii/rbac/migrations`

If You use Yii 2.0.6 version or newer, so then migrate custom table for this extension

`yii migrate --migrationPath=@agusedyc/mimin/migrations`

But if You install Yii 2.0.5 version or older, so then migrate custom table for this extension

`yii migrate --migrationPath=@agusedyc/mimin/migrations/old`

Usage
-----

[](#usage)

This RBAC manager have three main page, they are:

### Route

[](#route)

To get all action route from application. In here, You can on / off permission so not shown in menu role, rename alias/type of action route, so easy readable by end user. You can then access `Route` through the following URL:

```
http://localhost/path/to/index.php?r=mimin/route

```

### Role

[](#role)

To define level access of user, what he superadmin?, staff?, cashier? etc. In this menu, You can assign permission / action route (actions in application, they are create, update, delete, etc) to role. You can then access `Role` through the following URL:

```
http://localhost/path/to/index.php?r=mimin/role

```

Below screenshoot of route assignment to role [![Screenshoot Role](screenshoot.png "Screenshoot Role")](screenshoot.png)

### User

[](#user)

For standard user management, create/update/delete user, and assign role to user. You can then access `User` through the following URL:

```
http://localhost/path/to/index.php?r=mimin/user

```

We recommendate you for activate pretty URL.

Implementation on Widgets
-------------------------

[](#implementation-on-widgets)

### Example dynamic button

[](#example-dynamic-button)

It is used for checking if route right to access

```
if ((Mimin::checkRoute($this->context->id.'/create'))){
    echo Html::a('Create Note', ['create'], ['class' => 'btn btn-success']);
}

// in other case maybe You want ensure same of route so You can add parameter strict true
if ((Mimin::checkRoute($this->context->id.'/create',true))){
```

### Example dynamic menu

[](#example-dynamic-menu)

It is is used for filtering right access menu

```
use agusedyc\mimin\components\Mimin;
$menuItems = [
    ['label' => 'Home', 'url' => ['/site/index']],
    ['label' => 'About', 'url' => ['/site/about']],
    ['label' => 'Contact', 'url' => ['/site/contact']],
];

if (\Yii::$app->user->isGuest){
    $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
}
else{
    $menuItems[] = ['label' => 'App', 'items' => [
        ['label' => 'Category', 'url' => ['/category/index']],
        ['label' => 'Product', 'url' => ['/product/index']],
        ['label' => 'Cart', 'url' => ['/cart/index']],
    ]];
    $menuItems[] = [
        'label' => 'Logout (' . \Yii::$app->user->identity->username . ')',
        'url' => ['/site/logout'],
        'linkOptions' => ['data-method' => 'post']
    ];
}

$menuItems = Mimin::filterMenu($menuItems);
// in other case maybe You want ensure same of route so You can add parameter strict true
// $menuItems = Mimin::filterMenu($menuItems,true);

echo Nav::widget([
    'options' => ['class' => 'navbar-nav navbar-right'],
    'items' => $menuItems,
]);
```

### Example dynamic action column template

[](#example-dynamic-action-column-template)

It is used for filtering template of Gridview Action Column

```
use agusedyc\mimin\components\Mimin;
echo GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => [
        ...,
        [
          'class' => 'yii\grid\ActionColumn',
          'template' => Mimin::filterActionColumn([
              'update','delete','download'
          ],$this->context->route),
          ...
        ]
    ]
]);
```

How to Contribute
-----------------

[](#how-to-contribute)

This tools is an OpenSource project so your contribution is very welcome.

In order to get started:

- Install this in your local (read installation section)
- Clone this repository.
- Check [README.md](README.md).
- Send [pull requests](https://github.com/agusedyc/yii2-mimin/pulls).

Aside from contributing via pull requests you may [submit issues](https://github.com/agusedyc/yii2-mimin/issues).

Our Team
--------

[](#our-team)

- [Hafid Mukhlasin](http://www.hafidmukhlasin.com) - Project Leader / Indonesian Yii developer.

We'd like to thank our [contributors](https://github.com/agusedyc/yii2-mimin/graphs/contributors) for improving this tools. Thank you!

Jakarta - Indonesia

Buku Panduan
------------

[](#buku-panduan)

Tutorial tentang dasar-dasar RBAC atau access controll di Yii 2 dan panduan yii2-mimin dibahas secara komprehensif di buku saya ini

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 59.5% 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.

###  Release Activity

Cadence

Every ~247 days

Recently: every ~561 days

Total

11

Last Release

1366d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c0308f6ab1b92b22f87f38256ca2f12fbd6ef45d1863c61ffa515cc3f2d5747?d=identicon)[agusedyc](/maintainers/agusedyc)

---

Top Contributors

[![hscstudio](https://avatars.githubusercontent.com/u/2976897?v=4)](https://github.com/hscstudio "hscstudio (22 commits)")[![agusedyc](https://avatars.githubusercontent.com/u/5877372?v=4)](https://github.com/agusedyc "agusedyc (5 commits)")[![chabibnr](https://avatars.githubusercontent.com/u/4100006?v=4)](https://github.com/chabibnr "chabibnr (3 commits)")[![jatengstatistik](https://avatars.githubusercontent.com/u/138544673?v=4)](https://github.com/jatengstatistik "jatengstatistik (2 commits)")[![chiliman-oOo](https://avatars.githubusercontent.com/u/7079517?v=4)](https://github.com/chiliman-oOo "chiliman-oOo (2 commits)")[![luckynvic](https://avatars.githubusercontent.com/u/4830453?v=4)](https://github.com/luckynvic "luckynvic (1 commits)")[![m-alfan](https://avatars.githubusercontent.com/u/17586936?v=4)](https://github.com/m-alfan "m-alfan (1 commits)")[![virbo](https://avatars.githubusercontent.com/u/2990842?v=4)](https://github.com/virbo "virbo (1 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/agusedyc-yii2-mimin/health.svg)

```
[![Health](https://phpackages.com/badges/agusedyc-yii2-mimin/health.svg)](https://phpackages.com/packages/agusedyc-yii2-mimin)
```

###  Alternatives

[hscstudio/yii2-mimin

Simple RBAC Manager

5010.3k3](/packages/hscstudio-yii2-mimin)[lowbase/yii2-user

Yii2 user module

131.5k2](/packages/lowbase-yii2-user)[kakadu-dev/yii2-jwt-auth

Extension provide JWT auth for Yii2

105.8k](/packages/kakadu-dev-yii2-jwt-auth)

PHPackages © 2026

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