I have a console script in a Yii2 advanced installation from which I can successfully use several models under 'common\models\modelName', but when I try to use a model from under 'backend\models\db\AuthAssignment' I get the following error:
Exception 'yii\base\UnknownClassException' with message 'Unable to find 'backend\models\db\AuthAssignment' in file: /var/www/html/mvu/backend/models/db/AuthAssignment.php. Namespace missing?'
This model file starts as follows:
<?php
namespace app\models\db;
use Yii;
class AuthAssignment extends \yii\db\ActiveRecord {
And the call from the console\controller file is as follows:
<?php
namespace console\controllers;
use Yii;
use yii\console\Controller;
use backend\models\db\AuthAssignment;
use common\models\CourseLessons;
use common\models\Courses;
use common\models\Customer;
use common\models\Users;
class MijnvuController extends Controller {
What namespace could the error mean here and where to include it?