diff --git a/app/Http/Controllers/Admin/ImageController.php b/app/Http/Controllers/Admin/ImageController.php index a8b32fa..f36a508 100644 --- a/app/Http/Controllers/Admin/ImageController.php +++ b/app/Http/Controllers/Admin/ImageController.php @@ -32,6 +32,9 @@ class ImageController extends Controller public function store(Request $request, Gallery $gallery) { + $request->validate([ + 'image' => ['required'] + ]); foreach ($request->file('image') as $k => $item) { diff --git a/resources/views/admin/products/sub-pages/product-step3.blade.php b/resources/views/admin/products/sub-pages/product-step3.blade.php index 3c7d274..85a1694 100644 --- a/resources/views/admin/products/sub-pages/product-step3.blade.php +++ b/resources/views/admin/products/sub-pages/product-step3.blade.php @@ -177,5 +177,5 @@ {{----}}
- @include('components.panel-attachs',['attachs' => $item->attachs]) + @include('components.panel-attachs',['attachs' => $item->attachs??[]])