Class 'app\assets\AppAsset' not found in Yii2, file exist in assets

by PawelC   Last Updated May 16, 2019 06:26 AM

I was given the task to put the application on YII, i.e. I got its code and I have to put it on the server. Unfortunately, I have a problem, I threw the application on the server, I started the composer, I changed the data to the base, and after entering the website I get the following message:

Class 'app\assets\AppAsset' not found

I checked this and in the assets directory is the AppAsset class which has the code:

<?Php
namespace app\assets;
use yii\web\AssetBundle;

class AppAsset extends AssetBundle
{
     public $basePath = '@webroot';
     public $baseUrl = '@web';
     public $css = [
          'Css/app.css'
     ];

     public $js = [
         'Js/app.js'
     ];

     public $depends = [
         'Yii\web\YiiAsset'
         'Yii\bootstrap\BootstrapAsset'
     ];
}
?>

I am looking for a solution to this problem all the time, but nothing works.

Tags : yii2


Related Questions


Updated July 01, 2018 03:26 AM

Updated July 04, 2015 14:11 PM

Updated August 22, 2017 11:26 AM

Updated December 22, 2018 20:26 PM

Updated May 09, 2018 16:26 PM