i have a advanced yii app. i have common models to use in both frontend and backend. in localhost everything is ok. i created model file in common directory of yii. when i wanna use model i call it with "use commmon\models\Article" and it works ok in every page but site/index. when i try to list all articles in backend site/index i got an error like this:
PHP Fatal Error – yii\base\ErrorException
Class 'app\models\Article' not found
i’ve already added use common\models\Article code to site/index.php but it still says Article model not found. as i said before i get this error only on site/index.php file. i can list all articles in any other view files.