diff options
author | Mateja <mail@matejamaric.com> | 2020-11-16 16:26:39 +0100 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2020-11-16 16:26:39 +0100 |
commit | 772fdfb0c6e520e429b1a637747b2289f6dffe20 (patch) | |
tree | 07462b8de8aa9e2d9f8fc76654886c31db613de8 /app/Http/Controllers | |
parent | 5c8e187d09c19c920eab955ae68c1eed5b17747f (diff) | |
download | yota-laravel-772fdfb0c6e520e429b1a637747b2289f6dffe20.tar.gz yota-laravel-772fdfb0c6e520e429b1a637747b2289f6dffe20.zip |
Validate each uploaded image.
Diffstat (limited to 'app/Http/Controllers')
-rw-r--r-- | app/Http/Controllers/GalleryController.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Http/Controllers/GalleryController.php b/app/Http/Controllers/GalleryController.php index 8022ea0..d1e21cd 100644 --- a/app/Http/Controllers/GalleryController.php +++ b/app/Http/Controllers/GalleryController.php @@ -44,7 +44,8 @@ class GalleryController extends Controller public function store(Request $request) { $validatedData = $request->validate([ - 'images' => 'required' + 'images' => 'required', + 'images.*' => 'image' ]); $images = $request->file('images'); foreach ($images as $image) { |