aboutsummaryrefslogtreecommitdiff
path: root/app/Http/Controllers/GalleryController.php
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-11-16 16:26:39 +0100
committerMateja <mail@matejamaric.com>2020-11-16 16:26:39 +0100
commit772fdfb0c6e520e429b1a637747b2289f6dffe20 (patch)
tree07462b8de8aa9e2d9f8fc76654886c31db613de8 /app/Http/Controllers/GalleryController.php
parent5c8e187d09c19c920eab955ae68c1eed5b17747f (diff)
downloadyota-laravel-772fdfb0c6e520e429b1a637747b2289f6dffe20.tar.gz
yota-laravel-772fdfb0c6e520e429b1a637747b2289f6dffe20.zip
Validate each uploaded image.
Diffstat (limited to 'app/Http/Controllers/GalleryController.php')
-rw-r--r--app/Http/Controllers/GalleryController.php3
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) {