PHPackages                             fsyd88/yii2-admin - 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. fsyd88/yii2-admin

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

fsyd88/yii2-admin
=================

RBAC Auth manager And Adminlte for Yii2

v1.0(7y ago)03BSD-3-ClausePHP

Since Sep 4Pushed 7y agoCompare

[ Source](https://github.com/fsyd88/yii2-admin)[ Packagist](https://packagist.org/packages/fsyd88/yii2-admin)[ RSS](/packages/fsyd88-yii2-admin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

RBAC Manager for Yii 2
======================

[](#rbac-manager-for-yii-2)

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

[](#installation)

### Install With Composer

[](#install-with-composer)

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

Either run

```
php composer.phar require fsyd88/yii2-admin "~1.0"

```

or for the dev-master

```
php composer.phar require fsyd88/yii2-admin "1.x-dev"

```

Or, you may add

```
"fsyd88/yii2-admin": "~1.0"

```

to the require section of your `composer.json` file and execute `php composer.phar update`.

### Install From the Archive

[](#install-from-the-archive)

Download the latest release from here [releases](https://github.com/fsyd88/yii2-admin/releases), then extract it to your project. In your application config, add the path alias for this extension.

```
return [
    ...
    'aliases' => [
        '@fsyd/admin' => 'path/to/your/extracted',
        ...
    ]
];
```

### how use

[](#how-use)

- copy example-views\\yii2-app\* to backend\\views\\
- copy example-views\\yii2-app\\CommonController to backend\\controllers\\
- add configure item to backed\\config\\main.php

```
'modules' => [
    "admin" => [
        "class" => "fsyd\admin\Module",
    ],
],
'as access' => [
    'class' => 'fsyd\admin\components\AccessControl',
    'allowActions' => [
        'site/*',
        'admin/*'
    ]
],
#rbac
"authManager" => [
    "class" => 'yii\rbac\DbManager', #这里记得用单引号而不是双引号
    "defaultRoles" => ["guest"],
],

```

- open urlManager item from backed\\config\\mian.php
- modify backed\\config\\main-local.php by gii

```
$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'generators' =>[
        'model' => ['class' => 'fsyd\admin\gii\generators\model\Generator'],
        'crud' => ['class' => 'fsyd\admin\gii\generators\crud\Generator'],
    ]
];

```

- db item use 'dsn' =&gt; 'mysql:host=127.0.0.1;dbname=yiiadv', use 127.0.0.1 don't use 'localhost'
- SiteController file

```
public function actionIndex()
{
    $this->layout='main-index';
    return $this->render('index');
}

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Unknown

Total

1

Last Release

2804d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a544f9007ad57779acbf8481117c4c61f5eedf8a5f267cc332ae138d4a427787?d=identicon)[fsyd88](/maintainers/fsyd88)

---

Tags

authrbacyiiAdminLTEadmin

### Embed Badge

![Health badge](/badges/fsyd88-yii2-admin/health.svg)

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

###  Alternatives

[windhoney/yii2-rest-rbac

RBAC Auth manager for Yii2 RESTful

811.2k](/packages/windhoney-yii2-rest-rbac)[izyue/yii2-admin

RBAC Auth manager for Yii2

391.8k](/packages/izyue-yii2-admin)

PHPackages © 2026

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