@php $prev = $month->copy()->subMonth()->format('Y-m'); $next = $month->copy()->addMonth()->format('Y-m'); $inMonth = $byDay->filter(fn ($s, $day) => \Illuminate\Support\Carbon::parse($day)->isSameMonth($month)); @endphp

{{ $month->format('F Y') }}

@if ($canSchedule) Schedule session @endif
{{-- Month grid (desktop) --}} {{-- Agenda (phones and tablets) --}}
@forelse ($inMonth as $day => $list)

{{ \Illuminate\Support\Carbon::parse($day)->format('l, j F') }}

@empty
No sessions in {{ $month->format('F') }}.
@endforelse
@if ($inMonth->isEmpty()) @endif