add tangniyuqi/yii2-layer
to composer.json
$ composer install
$ php composer.phar require tangniyuqi/yii2-layer "*"
or add
"tangniyuqi/yii2-zui": "*"
to the require
section of your composer.json
file.
in view:
use tangniyuqi\assets\LayerAsset;
LayerAsset::register($this);
and for mobile, you can do like this:
use tangniyuqi\asset\LayerMobielAsset;
LaryerMobileAsset::regiter($this);