@foreach ($time_slot->time_slot->details as $slot)
@php
$hasBooks = $today_books->where('date',$date)->where('start_time','=',$slot->start_time)->where('end_time','=',$slot->end_time);
@endphp
{{date('h:i A', strtotime($slot->start_time))}} - {{date('h:i A', strtotime($slot->end_time))}}
@if($hasBooks->count() > 0)
@if($type)
@foreach ($hasBooks as $hasBook)
@php
$bookStatus = $hasBook->transactionStatus;
@endphp
@endforeach
@if ($bookStatus?->id == 9)
@if (strtotime($date . ' ' . $slot->start_time) >= strtotime(date("Y-m-d H:i:s",time())) || $type)
@else
@endif
@endif
@else
@if($hasBooks->last()->transactionStatus?->id == 9)
@if (strtotime($date . ' ' . $slot->start_time) >= strtotime(date("Y-m-d H:i:s",time())) || $type)
@else
@endif
@else
@if(auth()->check())
@if ($hasBooks->last()->user_id == auth()->user()->id)
Booked
@else
Booked
@endif
@else
Booked
@endif
@endif
@endif
@else
@if (strtotime($date . ' ' . $slot->start_time) >= strtotime(date("Y-m-d H:i:s",time())) || $type)
@else
@endif
@endif
@endforeach