{{ $view === 'hourly' ? $date->format('l, M d, Y') : $date->format('F Y') }}

Today
@if($view === 'hourly')
@foreach($timeSlots as $slot) @endforeach @foreach($resources as $resource) @foreach($timeSlots as $slot) @php $slotTime = Carbon\Carbon::parse($date->format('Y-m-d') . ' ' . $slot); $booking = $resource->bookings->first(function($b) use ($slotTime) { $start = Carbon\Carbon::parse($b->booking_date->format('Y-m-d') . ' ' . $b->booking_time); $end = Carbon\Carbon::parse($b->booking_date->format('Y-m-d') . ' ' . $b->end_time); return $slotTime->between($start, $end->subMinute()); }); $isPast = $slotTime->isPast(); @endphp @endforeach @endforeach
Resources{{ $slot }}
{{ $resource->name }}
{{ $resource->service->name }}
@if($booking) @if(Carbon\Carbon::parse($booking->booking_time)->format('H:i') === $slot) {{ $booking->customer_name }} {{ $booking->number_of_people }} pax @endif @elseif(!$isPast) + @endif
@else
@foreach($daysInMonth as $day) @endforeach @foreach($resources as $resource) @foreach($daysInMonth as $day) @php $booking = $resource->bookings->first(function($b) use ($day) { return $b->booking_date->format('Y-m-d') === $day->format('Y-m-d'); }); $isPast = $day->isPast() && !$day->isToday(); @endphp @endforeach @endforeach
Resources
{{ $day->format('D') }}
{{ $day->format('d') }}
{{ $resource->name }}
{{ $resource->service->name }}
@if($booking) {{ $booking->number_of_people }} @elseif(!$isPast) + @endif
@endif
Booked
Available
Past