{{-- resources/views/admin/flights/index.blade.php --}} {{-- Flights listing with search, pagination, status toggle, CRUD actions --}} {{-- Controller: Admin\FlightController@index --}} @extends('layouts.admin') @section('title', 'Flights') @section('page_title', 'Airlines / Flights') @section('page_css') @endsection @section('content')
@if(request('search')) Clear @endif
@forelse($flights as $flight) {{ $flights->firstItem() + $loop->index }} {{ $flight->name }} {{ $flight->name }} {{ $flight->destination->name ?? '—' }} @if($flight->discount_percent) {{ $flight->discount_percent }}% OFF @else @endif {{ $flight->is_top ? 'Yes' : 'No' }} @empty No flights found. @endforelse
Showing {{ $flights->firstItem() }}{{ $flights->lastItem() }} of {{ $flights->total() }} flights {{ $flights->appends(request()->query())->links('vendor.pagination.bootstrap-5') }}
@endsection @section('page_js') @endsection