@php $currentDate=date('Y-m-d'); @endphp @if($formattedDate >= $currentDate) @foreach($query as $key => $appointment) @php $holiDays = \App\Models\HolidaySetting::select('id')->where(['from_date'=>$formattedDate, 'account_id'=>$appointment->doctor_id, 'shift_id'=>$appointment->shift_id ])->first(); @endphp @if(empty($holiDays))
( {{ $appointment->name }} ) {!! $dayOfWeekName??'' !!}, {!! $selectedMonth??'' !!} {!! $selectedDate??'' !!}
@php $gaps = $appointment->gap_between_two_patient??20; $startTime = \Carbon\Carbon::parse($appointment->time_from ?? ''); $endTime = \Carbon\Carbon::parse($appointment->time_to ?? ''); $i=$appointment->serial_start??1; @endphp @while($startTime < $endTime) @php $current_time = \Carbon\Carbon::parse(date('H:i:s')); @endphp @if ($formattedDate == $currentDate && $startTime < $current_time) @else @php $time=$startTime->format('h:i A'); $checkAvaibleofNot = \App\Models\BookingCalendar::select('id')->where([ 'shift_id' => $appointment->shift_id, 'appointment_date' => $formattedDate, 'appointment_time' => $time, 'appointment_serial_no' => $i, 'doctor_ac_id' => $doctor->account_id, ])->first(); @endphp @if(empty($checkAvaibleofNot)) @if($appointment->patient_quantity>=$i) $appointment->doctor_id, 'shift_id'=>$appointment->shift_id, 'time'=>$time,'date'=>$formattedDate,'block_no'=>$i])}}' title="{{$i}}">{{$i}}