/** * Creates a new MHelpdoc model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new MHelpdoc(); if ($model->load(Yii::$app->request->post())) { $model->sort = 0; $model->visual = 1; $model->save(false); return $this->redirect(['view', 'id' => $model->helpdoc_id]); } else { return $this->render('create', ['model' => $model]); } }