{{-- filterCollapse --}}
@error('from_date') {{ $message }} @enderror
@error('to_date') {{ $message }} @enderror
Reset
@forelse($gallery as $item) @php $selectedProducts = []; if (!empty($item->products)) { $decoded = is_array($item->products) ? $item->products : json_decode($item->products, true); $selectedProducts = is_array($decoded) ? array_values($decoded) : []; } @endphp @empty @endforelse
# Image Title Application Category Products Status Created At Action
{{ $loop->iteration + ($gallery->currentPage() - 1) * $gallery->perPage() }} @if($item->image_path && file_exists(public_path('storage/' . $item->image_path))) {{ $item->title }} @else No Image @endif {{ $item->title ?? '-' }} {{ $item->applications->application_name ?? '-' }} {{ $item->categorys->name ?? '-' }} @if(!empty($selectedProducts)) {{ count($selectedProducts) }} Product(s) @else No Products @endif
@csrf
{{ $item->created_at ? \Carbon\Carbon::parse($item->created_at)->format('d M Y, h:i A') : '-' }}
{{-- Delete Button (Triggers Offcanvas) --}} {{-- OFFCANVAS: DELETE CONFIRMATION --}}
@csrf @method('DELETE')

Delete Gallery

Are you sure you want to delete this gallery record "{{ $item->title ?? 'Untitled' }}"?

No gallery records available yet.
{{-- Pagination --}}
{{ $gallery->links('pagination::bootstrap-5') }}
@foreach($gallery as $item) @php $selectedProducts = []; if (!empty($item->products)) { $decoded = is_array($item->products) ? $item->products : json_decode($item->products, true); $selectedProducts = is_array($decoded) ? array_values($decoded) : []; } @endphp @endforeach