diff options
author | Marvin Borner | 2018-10-30 18:41:29 +0100 |
---|---|---|
committer | Marvin Borner | 2018-10-30 18:41:29 +0100 |
commit | 39aa8530424310663c888f9e02224158961532e3 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /infrastructure/Http/ApiRequest.php | |
parent | bd568608bcda0729044e823aedfa799e10692e14 (diff) |
PHP is crap
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); - } -} |