Answer the question
In order to leave comments, you need to log in
Yii2 WebAsset and css?
Uploaded the site to the hosting and css from WebAsset is not connected, everything is ok on local
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace app\assets;
use yii\web\AssetBundle;
/**
* @author Qiang Xue <[email protected]>
* @since 2.0
*/
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'/static/css/styles.min.css'
];
public $js = [
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}
use app\assets\AppAsset;
use app\models\Navigation;
use yii\widgets\Menu;
/**
* @var \yii\web\View $this
* @var string $content
*/
AppAsset::register($this);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question