@include('customer.includes.style')
@include('customer.includes.header')

{{ $doctorCount }} Doctors

Today, {{ date('M j') }} - {{ date('D M j', strtotime('+7 days')) }}
@foreach ($doctors as $doctorDetail )

{{$doctorDetail->name}}

{{$doctorDetail->education}}

{{$doctorDetail->location}}

${{$doctorDetail->price_range}}

@foreach($doctorDetail->specialities as $speciality) {{ $speciality }} @endforeach
@php $daysOfWeek = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; $currentDate = new DateTime(); $dates = []; foreach ($daysOfWeek as $dayOfWeek) { $nextDate = clone $currentDate; $nextDate->modify('next ' . $dayOfWeek); $dates[$dayOfWeek] = $nextDate->format('M j'); } uasort($dates, function ($a, $b) { $dateA = DateTime::createFromFormat('M j', $a); $dateB = DateTime::createFromFormat('M j', $b); return $dateA <=> $dateB; }); @endphp @foreach ($dates as $dayOfWeek => $date) @foreach ($availability->where('doctor_id', $doctorDetail->id) as $availabilityItem) @if ($availabilityItem->day_of_week === $dayOfWeek) is_off_day) data-toggle="modal" data-target="#viewavaliablityModal-{{ $doctorDetail->id }}-{{ $availabilityItem->id }}" data-doctor-id="{{ $doctorDetail->id }}" data-availability-id="{{ $availabilityItem->id }}" data-date="{{ $date }}" @endif> {{ $availabilityItem->day_of_week }}, {{ $date }} @endif @endforeach @endforeach
@foreach ($availability->where('doctor_id', $doctorDetail->id) as $availabilityItem) @endforeach @endforeach
@include('customer.includes.footer')
@include('customer.includes.script')