I am trying to set up frontend environment I tried making AppAsset under frontend/assets
and it shows:
Invalid Configuration – yii\base\InvalidConfigException
The directory does not exist:
AppAsset.php:
<?php
namespace frontend\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
public $basePath = "@webroot";
public $baseUrl = "@web";
public $css = [
YII_ENV_DEV ?
"node_modules/bootstrap/dist/css/bootstrap.css" :
"node_modules/bootstrap/dist/css/bootstrap.min.css",
];
public $js = [
YII_ENV_DEV ?
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" :
"node_modules/bootstrap/dist/js/bootstrap.bundle.js",
];
public $depends = [
'yii\web\YiiAsset'
];
}
in my layout/main.php:
<?php
/** @var \yii\web\View $this */
/** @var string $content */
use frontend\assets\AppAsset;
use yii\helpers\Html;
?>
<?php
AppAsset::register($this);
?>
I am trying to To Register The AppAsset in layout/main.php
Paths:
What exactly is happening I tried Making new Advanced App from scratch and it worked just fine but now I am forced to work in the company project so I have no choice but to make it work Please Help.