/** * Creates a new Services model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Services(); if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->session->setFlash('success', 'Your information saved.'); return $this->redirect(['index']); echo Yii::$app->session->getFlash('success'); } else { return $this->render('create', ['model' => $model]); } }