https://dev.to/moose_said I'm currently working on a major side project that takes up practically all of my free time.

Exit fullscreen mode routes 2- Routes: In routes/web.php file, we're using the ImageUploadController@store to handle post requests to this route.

public function rules() { return [ 'images' => ['bail', 'required'], 'images.*' => ['bail', 'image', 'mimes:jpeg,jpg,png,gif,webp']]; }

Now we can use our Validation rule by importing it to whatever place we're using for validation, in my case StoreImagesRequest.php */ public function rules() { return [ 'images' => ['bail', 'required', new Maxsize], 'images.*' => ['bail', 'image', 'mimes:jpeg,jpg,png,gif,webp']]; }}
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners