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