Answer the question
In order to leave comments, you need to log in
How to get data from a column in a table?
There is a User table in the database. At authorization there is a request to this table. It is necessary to pull out the data from the "status" column and pass it to the template.
Data that comes:
skrinshoter.ru/s/250218/n0WcWr33?a
Controller:
/**
* Login action.
*
* @return Response|string
*/
public function actionLogin()
{
if (!Yii::$app->user->isGuest) {
return $this->goHome();
}
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
print_r($model);
die();
return $this->goBack();
}
return $this->render('login', [
'model' => $model,
]);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question