/** * Creates a new model. * If creation is successful, the browser will be redirected to the 'view' page. */ public function actionCreate() { $model = new Citation(); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if ($model->load(\Yii::$app->request->post())) { if ($model->validate() && $model->save()) { return $this->redirect(['index']); } } return $this->render('create', ['model' => $model]); }