diff options
Diffstat (limited to 'infrastructure/Http/ApiRequest.php')
-rw-r--r-- | infrastructure/Http/ApiRequest.php | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/infrastructure/Http/ApiRequest.php b/infrastructure/Http/ApiRequest.php deleted file mode 100644 index 0183bb4..0000000 --- a/infrastructure/Http/ApiRequest.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace Infrastructure\Http; - -use Illuminate\Contracts\Validation\Validator; -use Illuminate\Foundation\Http\FormRequest; -use Symfony\Component\HttpKernel\Exception\HttpException; -use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException; - -abstract class ApiRequest extends FormRequest -{ - protected function failedValidation(Validator $validator) - { - throw new UnprocessableEntityHttpException($validator->errors()->toJson()); - } - - protected function failedAuthorization() - { - throw new HttpException(403); - } -} |