@extends('layouts.app') @section('title', 'Appointments') @section('content')
Schedule

Appointments

Book appointment
@foreach(['upcoming'=>'Upcoming','today'=>'Today','past'=>'Past','all'=>'All'] as $f=>$lbl) {{ $lbl }} @endforeach
@forelse($grouped as $date => $items)
{{ \Illuminate\Support\Carbon::parse($date)->format('l, j F Y') }}
@foreach($items as $appt)
{{ $appt->scheduled_at->format('g:i A') }}
{{ $appt->patient->initials }}
{{ $appt->patient->name }}
{{ $appt->reason ?: 'Consultation' }} ยท {{ $appt->duration_minutes }} min
{{ ucfirst(str_replace('_',' ',$appt->status)) }}
@if($appt->status==='scheduled')
@csrf @method('PATCH')
@endif Edit
@endforeach
@empty
No appointments in this view.
@endforelse @if($appointments->hasPages())@endif @endsection