X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..8d7febe482f92a34093127c60c6e2dda342b4223:/app/Http/Controllers/Api/ApiController.php diff --git a/app/Http/Controllers/Api/ApiController.php b/app/Http/Controllers/Api/ApiController.php index 0a3d89453..5d6f4a926 100644 --- a/app/Http/Controllers/Api/ApiController.php +++ b/app/Http/Controllers/Api/ApiController.php @@ -1,4 +1,6 @@ -toResponse(); } /** * Get the validation rules for this controller. + * Defaults to a $rules property but can be a rules() method. */ public function getValdationRules(): array { + if (method_exists($this, 'rules')) { + return $this->rules(); + } + return $this->rules; } -} \ No newline at end of file +}