nullref/yii2-admin
Composer 安装命令:
composer require nullref/yii2-admin
包简介
README 文档
README
Module for administration
Check extended version of this module at this link
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist nullref/yii2-admin "*"
or add
"nullref/yii2-admin": "*"
to the require section of your composer.json file.
Then You have run console command for install this module and run migrations:
php yii module/install nullref/yii2-admin
php yii modules-migrate
Pay attention that if you don't use our application template it needs to change config files structure to have ability run commands that show above.
Please check this documentation section
Admin Menu
For adding items to admin menu you have to implement IAdminModule interface, e.g.:
public static function getAdminMenu() { return [ 'label' => \Yii::t('admin', 'Subscription'), 'icon' => 'envelope', 'items' => [ 'emails' => ['label' => \Yii::t('app', 'Subscribers'), 'icon' => 'envelope-o', 'url' => ['/subscription/email/index']], 'messages' => ['label' => \Yii::t('app', 'Messages'), 'icon' => 'envelope-o', 'url' => ['/subscription/message/index']], ] ]; }
Admin Controller
If you use IAdminController interface in controller, admin layout and default access rule will be set in controller before action.
Modules system
This module integrated in system which contain other useful components. View details
Overriding
Example:
/** module config **/ 'admin' => [ 'class' => 'nullref\admin\Module', 'adminModel' => 'app\models\Admin', // admin model class 'controllerMap' => [ //controllers 'user' => 'app\modules\admin\controllers\UserController', 'main' => 'app\modules\admin\controllers\MainController', ], 'components' => [ //menu builder 'menuBuilder' => 'app\\components\\MenuBuilder', ], ],
And translations
nullref/yii2-admin 适用场景与选型建议
nullref/yii2-admin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.22k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2015 年 07 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 nullref/yii2-admin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nullref/yii2-admin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-01