githubjeka / yii2-gui-rbac
Yii 2 RBAC 管理GUI界面
v2.0.0
2019-01-29 11:23 UTC
Requires
- php: >=5.6.0
- yiisoft/yii2: >=2.0.6
- yiisoft/yii2-bootstrap: >=2.0.5
Requires (Dev)
- phpunit/phpunit: 5.1.*
This package is auto-updated.
Last update: 2024-09-19 16:46:01 UTC
README
如何安装
🐤 执行以下命令
- 确保组件
authManager
已配置。 - 在您的 composer.json 中添加
"githubjeka/yii2-gui-rbac": "1.0.2"
- 运行
composer update
- 如果您的项目不需要实现 rbac,则运行
yii migrate --migrationPath=@yii/rbac/migrations/
- 将以下代码添加到
@app/config/main.php
中
// '/config/web.php' for Basic or '/backend/config/main' - Advanced Yii2 application. 'modules' => [ 'rbac' => [ 'class' => 'githubjeka\rbac\Module', 'as access' => [ // if you need to set access 'class' => 'yii\filters\AccessControl', 'rules' => [ [ 'allow' => true, 'roles' => ['@'] // all auth users ], ] ] ], ],
- 访问 URL
/index.php?r=rbac