@extends('admin.layouts.app') @section('title', 'Packages') @section('page-title', 'Travel Packages') @section('page-subtitle', 'Kelola semua data paket perjalanan') @section('header-actions') Tambah Package @endsection @section('content') {{-- Stats Row --}}

Total Package

{{ $packages->total() }}

Kategori

{{ $categories->count() }}

Halaman

{{ $packages->currentPage() }} / {{ $packages->lastPage() }}

{{-- Filter & Search --}}
@if(request()->hasAny(['search','category','tag'])) Reset @endif
{{-- Table --}}
@forelse($packages as $pkg) @empty @endforelse
# Package Kategori Durasi Min Pax Harga Tag Aksi
{{ $loop->iteration + ($packages->currentPage() - 1) * $packages->perPage() }}

{{ $pkg->title }}

@if($pkg->location)

{{ $pkg->location }}

@endif
@if($pkg->category_name) {{ $pkg->category_name }} @else — @endif @if($pkg->duration_day || $pkg->duration_night) {{ $pkg->duration_day ?? '—' }}D / {{ $pkg->duration_night ?? '—' }}N @else — @endif {{ $pkg->min_pax ? $pkg->min_pax . ' pax' : '—' }} @if($pkg->price_starting_from)

Rp {{ number_format($pkg->price_starting_from, 0, ',', '.') }}

mulai dari

@else — @endif
@if($pkg->tag) @php $tagColor = match($pkg->tag) { 'popular' => 'bg-amber-50 text-amber-700', 'new' => 'bg-emerald-50 text-emerald-700', 'promo' => 'bg-rose-50 text-rose-700', default => 'bg-slate-100 text-slate-500', }; @endphp {{ ucfirst($pkg->tag) }} @else — @endif
@csrf @method('DELETE')

Belum ada data package

Tambah Package Pertama
{{-- Pagination --}} @if($packages->hasPages())

Menampilkan {{ $packages->firstItem() }}–{{ $packages->lastItem() }} dari {{ $packages->total() }} data

@if($packages->onFirstPage()) ← Prev @else ← Prev @endif @foreach($packages->getUrlRange(max(1, $packages->currentPage()-2), min($packages->lastPage(), $packages->currentPage()+2)) as $page => $url) @if($page == $packages->currentPage()) {{ $page }} @else {{ $page }} @endif @endforeach @if($packages->hasMorePages()) Next → @else Next → @endif
@endif
@endsection