AppAsset文件不变,复制一份修改名称为MyAPPAsset,文件代码如下:
<?php
namespace backend\assets;
use yii\web\AssetBundle;
class MyAppAsset extends AssetBundle
{
public $sourcePath = ‘@vendor/almasaeed2010/adminlte’;
public $css = [
‘plugins/datatables/dataTables.bootstrap.css’,
];
public $js = [
];
public $depends = [
‘dmstr\web\AdminLteAsset’,
];
}
在需要引用的文件内添加如下代码:
backend\assets\MyAppAsset::register($this);