/** * Creates a new AdmMenuItems model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new AdmMenuItems(); $model->visible = 1; if ($model->load(Yii::$app->request->post()) && $model->save()) { Yii::$app->session->setFlash("category", 'Categoria incluĂda com sucesso!'); return $this->redirect(['index']); } else { return $this->render('create', ['model' => $model]); } }