getRules(); } public function getRules() { list(, $action) = explode('@', $this->route()->getActionName()); $ruleMethodName = 'get' . ucfirst($action) . 'Rules'; if(method_exists($this, $ruleMethodName)){ $rules = $this->$ruleMethodName(); if(is_array($rules)){ return $rules; } } return []; } }