/** * @return string|\yii\web\Response */ public function actionCreate() { $model = new Page(); $model->loadDefaultValues(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['list']); } return $this->render('create', ['model' => $model]); }