示例#1
0
 private function save()
 {
     $model = new RuleGroupModel(['name' => $this->name]);
     $model->save();
     $this->dbid = $model->id;
     $this->model = $model;
     $this->saveRules();
 }
示例#2
0
 public function rules()
 {
     $id = \Input::get('id');
     $names = explode(',', \Input::get('names'));
     $result = RuleGroupModel::find($id);
     if ($result) {
         return $result->rules;
     }
     $result = RuleGroupModel::whereIn('name', $names)->get();
     if ($result) {
         return $result;
     }
     return null;
 }