开源后台模板AdminLTE
引入AdminLTE的代码
在github上的托管地址:https://github.com/almasaeed2010/AdminLTE 使用composer方式引入
1 | composer require "almasaeed2010/adminlte=~2.0" |
引入AdminLTE Asset Bundle的代码
在github上的托管地址:https://github.com/dmstr/yii2-adminlte-asset 使用composer方式引入类
1 | composer require dmstr/yii2-adminlte-asset "2.*" |
如果使用的YII2高级模式
后台应用在/backend,所以在backend/config/main.php中配置
1 | 'components' => [ |
或者直接复制vendor/dmstr/yii2-adminlte-asset/example-views/yiisoft/yii2-app下的文件夹,覆盖backend/web/views下的文件夹
这是成功后,输入后台地址的显示结果
