@extends('layouts.app') @section('content') @php $isAdmin = optional(auth()->user()->role)->role_name === 'admin'; @endphp @if(session('success'))
Success
{{ session('success') }}
@endif
{{-- HEADER --}}

{{ $isAdmin ? 'All Destinations' : 'Destinations' }}

{{ $destinations->total() }} Total
{{-- SEARCH INPUT --}}
@if(request('search')) @else @endif
@if($isAdmin) Add Destination @endif
{{-- Active filter chips --}} @if(request('search'))
@if(request('search')) 🔍 Search: {{ request('search') }} × @endif Clear all
@endif {{-- TABLE --}}
@forelse($destinations as $key => $destination) @empty @endforelse
SL Photo Destination Name Action
{{ $destinations->firstItem() + $key }} @if($destination->photo) @else
No photo
@endif
{{ $destination->name }}
@if($destination->short_description)
{{ $destination->short_description }}
@endif
@if($isAdmin)
@csrf @method('DELETE')
@endif
No destinations found.
{{-- PAGINATION --}} @if($destinations->hasPages())

Showing {{ $destinations->firstItem() }}{{ $destinations->lastItem() }} of {{ $destinations->total() }} destinations

{{ $destinations->onEachSide(1)->appends(request()->query())->links() }}
@endif
{{-- VIEW MODALS --}} @foreach($destinations as $destination) @endforeach @endsection