I have created a model class using Model generator Gii with namespace common\\models\\Artikel
and there is no error but when I'm trying to create a model class using CRUD generator Gii, there is a error like this:
In my Models folder there is folder again named Artikel
and then on artikel.php
have that namespace common\\models\\Artikel
. But I don't know why I get this error using CRUD generator.
Declaration of this class should be in common/models/Artikel.php
and inside of it you should have:
namespace common\models;
class Artikel extends \yii\db\ActiveRecord {
// ...
}
Artikel
Should not be part of the namespace, it is class name.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.