@extends('layouts.main') @section('content')
{{-- ================= AVAILABILITY ================= --}}
{{-- Header --}}
Availability Management
{{-- Add Availability --}}
@csrf
{{-- ✅ Doctor Select --}}

{{-- List --}}
Availability List
@foreach($availabilities as $item) {{-- Doctor Header --}} {{-- Booking List --}} @foreach($bookings->where('consultant_id', $item->consultant_id) as $booking) @endforeach @endforeach
ID Doctor Date Time Slot Status Action
Dr. {{ $item->consultant->first_name ?? '' }} | {{ \Carbon\Carbon::parse($item->available_date)->format('d M Y') }}
{{ $booking->id }} {{ $booking->user->first_name ?? '' }} {{ $booking->user->last_name ?? '' }} {{ \Carbon\Carbon::parse($booking->appointment_date)->format('d M Y') }} {{ date('h:i A', strtotime($booking->start_time)) }} - {{ date('h:i A', strtotime($booking->end_time)) }} ₹ {{ $booking->amount }} {{ ucfirst($booking->booking_status) }}
@csrf @method('DELETE')
{{-- ================= BOOKINGS ================= --}}
{{-- Header --}}
Booking Management
{{-- Add Booking --}}
@csrf

{{-- List --}}
Booking List
@forelse($bookings as $booking) @empty @endforelse
ID User Date Time Amount Status Action
{{ $booking->id }} {{ $booking->user->name ?? $booking->user->first_name ?? '-' }} {{ \Carbon\Carbon::parse($booking->appointment_date)->format('d M Y') }} {{ date('h:i A', strtotime($booking->start_time)) }} - {{ date('h:i A', strtotime($booking->end_time)) }} ₹ {{ $booking->amount }} {{ ucfirst($booking->booking_status) }}
@csrf @method('DELETE')
No Data
@endsection