simplator/admin
最新稳定版本:0.2.0
Composer 安装命令:
composer require simplator/admin
包简介
Yii2 admin tools
README 文档
README
Yii2 admin
Bases on pheme/yii2-admin
Added multidomain configuration
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist simplator/admin "*"
or add
"simplator/admin": "*"
to the require section of your composer.json file.
Subsequently, run
./yii migrate --migrationPath=@yii/rbac/migrations/
in order to create the admin table in your database.
Usage
There are 2 parts to this extension. A module and a component. The module provides a simple GUI to edit your admin. The component provides a way to retrieve and save admin programmatically.
Add this to your main configuration's modules array
'modules' => [ 'admin' => [ 'class' => 'simplator\admin\Module', ], ... ],
Add this to your main configuration's components array
'components' => [ 'admin' => [ 'class' => 'simplator\admin\components\admin' ], ... ]
Typical component usage
$admin = Yii::$app->admin; $value = $admin->get('section.key'); $value = $admin->get('key', 'section'); $admin->set('section.key', 'value'); $admin->set('section.key', 'value', null, 'string'); $admin->set('key', 'value', 'section', 'integer'); // Automatically called on set(); $admin->clearCache();
统计信息
- 总下载量: 138
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-23