R
R
rusline2017-02-07 21:07:28
Yii
rusline, 2017-02-07 21:07:28

Why are styles not working in yii2?

I can't connect styles to
main.php site

<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yiibootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>

AppAsset.php
<?php

namespace frontend\assets;

use yii\web\AssetBundle;

/**
 * Main frontend application asset bundle.
 */
class AppAsset extends AssetBundle
{
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
        'public/css/style.css',
    ];
    public $js = [
    ];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];
}

What could be the matter, it seems that I also do everything according to the documentation

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question