From 56ae7fd9e374b39d894efca90928c1b1bcb5f107 Mon Sep 17 00:00:00 2001 From: Lupu Gheorghe Date: Wed, 18 Oct 2023 14:44:52 +0300 Subject: [PATCH] fix max statue file size --- app/Http/Middleware/HandleInertiaRequests.php | 1 + app/Http/Requests/ProfileUpdateRequest.php | 2 +- app/Http/Requests/RegistrationRequest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index eac22582..011b443c 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -28,6 +28,7 @@ public function share(Request $request): array 'auth' => [ 'user' => $request->user(), ], + 'organization_status' => fn () => $request->user()?->organization?->status, 'locales' => fn () => [ 'available' => locales(), 'current' => app()->getLocale(), diff --git a/app/Http/Requests/ProfileUpdateRequest.php b/app/Http/Requests/ProfileUpdateRequest.php index 309b4370..c7e3feec 100644 --- a/app/Http/Requests/ProfileUpdateRequest.php +++ b/app/Http/Requests/ProfileUpdateRequest.php @@ -20,7 +20,7 @@ public function rules(): array return [ 'name' => ['string', 'max:255'], 'email' => ['email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)], - 'phone' => ['nullable','string', 'max:255'], + 'phone' => ['nullable', 'string', 'max:255'], ]; } } diff --git a/app/Http/Requests/RegistrationRequest.php b/app/Http/Requests/RegistrationRequest.php index ace67e6a..ff28d7c2 100644 --- a/app/Http/Requests/RegistrationRequest.php +++ b/app/Http/Requests/RegistrationRequest.php @@ -32,7 +32,7 @@ public function rules(): array 'ngo.name' => ['required', 'string'], 'ngo.description' => ['required', 'string', 'max:1000'], 'ngo.logo' => ['required', 'image'], - 'ngo.statute' => ['required', 'file', 'mimes:pdf'], + 'ngo.statute' => ['required', 'file', 'mimes:pdf','max:15240'], 'ngo.street_address' => ['required', 'string'], 'ngo.cif' => ['required', 'string', 'unique:organizations,cif', new ValidCIF], 'ngo.contact_email' => ['required', 'email'],