@extends('backend.app') @section('title', 'Shop Gallery (20 Images)') @section('content')

Shop Gallery Management

@if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
Please fix the following validation errors:
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf

20 Image Upload Form & Sort Orders

All 20 images and sort orders are required
@for ($i = 0; $i < 20; $i++) @php $item = $items[$i] ?? null; $slotNum = $i + 1; $existingImage = $item ? $item->image : null; $sortOrder = old("gallery.{$i}.sort_order", $item->sort_order ?? $slotNum); @endphp
#{{ $slotNum }}
Gallery Image {{ $slotNum }}
@if ($existingImage)
Gallery Image {{ $slotNum }}
Current Image Saved
@else
No Image Selected @endif
@error("gallery.{$i}.image")
{{ $message }}
@enderror
@error("gallery.{$i}.sort_order")
{{ $message }}
@enderror
@endfor
@endsection