V
V
Voroncheg2019-09-01 15:31:54
Yii
Voroncheg, 2019-09-01 15:31:54

Why does Call to undefined method app\models\AdduserForm::getDb() Yii2 error pop up?

Hello. When I use this code in the controller
if($model->validate()){
\Yii::$app->session->setFlash('success', 'Data sent');
}else{
\Yii::$app->session->setFlash('error', 'Data error');
}
That the error gets out. Call to undefined method app\models\AdduserForm::getDb(). The error appears on $model->validate() .
Please tell me how to fix this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question