@extends('layouts.app')
@section('title', 'Appointments')
@section('content')
@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 }}
{{ ucfirst(str_replace('_',' ',$appt->status)) }}
@if($appt->status==='scheduled')
@endif
Edit
@endforeach
@empty
No appointments in this view.
@endforelse
@if($appointments->hasPages())@endif
@endsection