一、yii2-adminlte-asset
adminlte一款基于bootstrap的响应模块。yii2-adminlte-asset更是一款基于yii2框架进行开发的后台主题模版。
1、安装(安装前先运行composer self-update)
composer require dmstr/yii2-adminlte-asset "2.*"
等待几分钟完成后,拷贝 vendor\dmstr\yii2-adminlte-asset\example-views\yiisoft\yii2-app 目录下面的文件到项目 backend\views, 可直接进行覆盖替换;
打开访问后台主页和登录页:
2、打开 backend\views\layouts\main.php,找到body将其class修改如下,可以改变不同的颜色主题:
"skin-blue",
"skin-black",
"skin-red",
"skin-yellow",
"skin-purple",
"skin-green",
"skin-blue-light",
"skin-black-light",
"skin-red-light",
"skin-yellow-light",
"skin-purple-light",
"skin-green-light"
二、yii2-admin权限组件
yii2-admin是一个基于yii2的权限管理组件,使用它可以快速搭建可视化的权限管理功能;
1、首先创建yii2的rbac数据表,数