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