@extends('layouts.main') @section('content')
{{-- PAGE HEADER --}}

My Bookings

Logged in user booking history

{{-- SUCCESS MESSAGE --}} @if (session('success'))
{{ session('success') }}
@endif {{-- BOOKINGS CARD --}}
Booking List
@php $myBookings = $bookings; @endphp @forelse($myBookings as $key => $b) {{-- ID --}} {{-- USER --}} {{-- DATE --}} {{-- TIME --}} {{-- AMOUNT --}} {{-- STATUS --}} {{-- ACTION --}} @empty @endforelse
# User Date Time Amount Status Action
#{{ $key + 1 }}
{{ strtoupper(substr($b->user->first_name ?? 'U', 0, 1)) }}
{{ $b->user->first_name ?? 'N/A' }} {{ $b->user->last_name ?? '' }}
{{ $b->user->email ?? '' }}
{{ \Carbon\Carbon::parse($b->date)->format('d M Y') }}
{{ \Carbon\Carbon::parse($b->date)->format('l') }}
@php [$startTime, $endTime] = array_pad( explode(' - ', (string) $b->time), 2, null, ); @endphp {{ $startTime ? \Carbon\Carbon::parse($startTime)->format('h:i A') : 'N/A' }} - {{ $endTime ? \Carbon\Carbon::parse($endTime)->format('h:i A') : 'N/A' }}
Session Time
₹ {{ $b->fees ?? ($b->amount ?? 0) }}
@csrf @php $user = auth()->user(); $isRestricted = $user->hasRole('user'); @endphp
@csrf @method('DELETE')
No Bookings Found

Logged in user has no bookings available.

@endsection