M
M
Mikhail Bazhenov2014-06-24 20:31:46
Yii
Mikhail Bazhenov, 2014-06-24 20:31:46

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',
    ];
}

In layout
use app\assets\AppAsset;
use app\models\Navigation;
use yii\widgets\Menu;
/**
 * @var \yii\web\View $this
 * @var string $content
 */
AppAsset::register($this);

JS is connected and css is not, I'm sitting with such eyes O_O

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Bazhenov, 2014-06-25
@benign

https://github.com/yiisoft/yii2/issues/4036

S
Sergey, 2014-06-25
@TsarS

What's wrong with htaccess?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question