@extends('admin.layouts.master') @section('title','Booking Details') @section('content')

Booking #{{ $booking->id }}

⬅ Back to List
Booking Information

Booking Date: {{ \Carbon\Carbon::parse($booking->booking_date)->format('d M Y') }}

Bus Type: {{ $booking->busType->name ?? 'N/A' }}

Total Price: ₹{{ number_format($booking->total_price,2) }}

Status: {{ ucfirst($booking->status) }}

Created At: {{ $booking->created_at->format('d M Y H:i') }}

Passenger Details
@foreach($booking->bookedSeats as $index => $seat) @endforeach
# Seat Name Age Phone Email
{{ $index + 1 }} {{ $seat->seat_number ?? 'N/A' }} {{ $seat->pivot->passenger_name }} {{ $seat->pivot->passenger_age }} {{ $seat->pivot->passenger_phone }} {{ $seat->pivot->passenger_email }}
Bus Seat Layout
@php $rows = $booking->busType->rows ?? 10; $cols = $booking->busType->cols ?? 4; $bookedSeats = $booking->bookedSeats->pluck('seat_number')->toArray(); @endphp @for($r = 1; $r <= $rows; $r++)
@for($c = 1; $c <= $cols; $c++) @php $seatNo = chr(64 + $r) . $c; // A1, A2 ... $isBooked = in_array($seatNo, $bookedSeats); @endphp
{{ $seatNo }}
@endfor
@endfor
Available Booked
@endsection