Переместил резюме

This commit is contained in:
anatolidew
2021-12-10 15:29:07 +03:00
parent afe743a6f3
commit 5c80f72ee5
3 changed files with 44 additions and 11 deletions

View File

@ -112,6 +112,21 @@ class UserCardController extends Controller
]);
}
public function actionResume()
{
$id_user = Yii::$app->user->id;
$result = UserCard::find()->where(['id_user' => $id_user])->asArray()->all();
if ($result) {
$id = $result[0]['id'];
$model = $this->findModel($id);
return $this->render('resume', [
'model' => $model
]);
} else {
return $this->render('index', ['info' => '<h3>Ваши личные данные не заненсены в базу.</h3>']);
}
}
/**
* Finds the Product model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.