/** * for creating page * @return mix */ public function actionCreate() { $checklist = new Checklist(); if ($checklist->load(Yii::$app->request->post()) && $checklist->save()) { return $this->redirect(['index']); } else { return $this->render('create', ['checklist' => $checklist]); } }