/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new models\RbacAuthtask();
     $model->scenario = 'create';
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->task_id]);
     }
     // 验证失败:$errors 是一个包含错误信息的数组
     //$errors = $model->errors;
     return $this->render('/rbac/authtask/create', ['model' => $model]);
 }