承接 fat2fast/yii2-admin 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fat2fast/yii2-admin

最新稳定版本:3.2.3

Composer 安装命令:

composer require fat2fast/yii2-admin

包简介

RBAC Auth manager for Yii2

README 文档

README

Warning: This version was no longer maintained. Please use version 2.x.

composer require fat2fast/yii2-admin "~3.2"

Documentation

Installation

Install With Composer

The preferred way to install this extension is through composer.

Either run

php composer.phar require fat2fast/yii2-admin "~3.2"

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

Install From the Archive

Download the latest release from here releases, then extract it to your project. In your application config, add the path alias for this extension.

return [
    ...
    'aliases' => [
        '@fat2fast/admin' => 'path/to/your/extracted',
        // for example: '@mdm/admin' => '@app/extensions/mdm/yii2-admin-3.0.0',
        ...
    ]
];

Usage

Once the extension is installed, simply modify your application configuration as follows:

return [
    'bootstrap' => [
        'admin', // required
        ...
    ],
    'modules' => [
        'admin' => [
            'class' => 'fat2fast\admin\Module',
            ...
        ]
        ...
    ],
    ...
    'components' => [
        ...
        'authManager' => [
            'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
        ]
    ],
    'as access' => [
        'class' => 'fat2fast\admin\classes\AccessControl',
        'allowActions' => [
            'site/*',
            'admin/*',
            'some-controller/some-action',
            // The actions listed here will be allowed to everyone including guests.
            // So, 'admin/*' should not appear here in the production, of course.
            // But in the earlier stages of your development, you may probably want to
            // add a lot of actions here until you finally completed setting up rbac,
            // otherwise you may not even take a first step.
        ]
    ],
];

See Yii RBAC for more detail. You can then access Auth manager through the following URL:

http://localhost/path/to/index.php/admin
http://localhost/path/to/index.php/admin#/route
http://localhost/path/to/index.php/admin#/permission
http://localhost/path/to/index.php/admin#/menu
http://localhost/path/to/index.php/admin#/role
http://localhost/path/to/index.php/admin#/assignment

To use the menu manager (optional), execute the migration here:

yii migrate --migrationPath=@fat2fast/admin/migrations

If you use database (class 'yii\rbac\DbManager') to save rbac data, execute the migration here:

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

统计信息

  • 总下载量: 308
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 581
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2024-06-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固