/** * Creates a new CmsMenuArea model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new CmsMenuArea(); if ($model->load(Yii::$app->request->post())) { $model->created_by = Yii::$app->user->id; $model->updated_at = new Expression('NOW()'); $model->save(); return $this->redirect(['view', 'id' => $model->area_id]); } else { return $this->render('create', ['model' => $model]); } }