A
A
Alexander Ivanov2018-02-17 21:27:06
Yii
Alexander Ivanov, 2018-02-17 21:27:06

Why does an error occur when generating a class from a table in YII2?

error in class generation in GII from table
Unable to find 'frontend\models\User' in file: W:\domains\Portfolio.local/frontend/models/User.php. Namespace missing?
in the model User
namespace frontend\models\User;
in the controller
use frontend\models\User;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2018-02-17
@alexsteadfast

Good evening.
It is necessary to use namespace in the model without specifying the file name.
And in the controller everything is correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question