/** * Creates a new EfMenuMain model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new EfMenuMain(); if ($model->load(Yii::$app->request->post()) && $this->beforeCreate($model) && $model->save()) { return; } else { return $this->renderAjax('create', ['model' => $model]); } }