/**
  * Creates a new Dict model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate($category)
 {
     $model = new Dict();
     $model->category_id = $category;
     $model->sort_num = 100;
     $model->status = Constants::Status_Enable;
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['index', 'category' => $category]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
 /**
  * Creates a new Dict model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $this->setMenus(43, "添加字典");
     $category_id = LsYii::getGetValue('category_id', 'sex');
     $model = new Dict();
     $model->category_id = $category_id;
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['index', 'category_id' => $category_id]);
     } else {
         return $this->render('create', ['model' => $model, 'category_id' => $category_id]);
     }
 }