Consultation Settings
@if(request('doctor_user_id'))
@csrf @method('DELETE')
@endif
@php $days = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']; $times = []; $start = strtotime("12:00 AM"); $end = strtotime("11:45 PM"); while ($start <= $end) { $times[]=date("h:i A", $start); $start=strtotime("+15 minutes", $start); } @endphp @php $groupedAvailability=collect($availabilityByDay) ->map(function ($dayItems) { return collect($dayItems)->groupBy(function ($item) { return $item->start_time . '_' . $item->end_time . '_' . $item->clinic_id; }); }); @endphp @foreach($days as $day) @php $daySlots = $groupedAvailability[$day] ?? collect(); $isOpen = $daySlots->count() ? 'show' : ''; @endphp
{{ strtoupper(substr($day,0,3)) }}
@if($daySlots->count()) Available @else Unavailable @endif
{{-- LOOP EACH SLOT --}} @if($daySlots->count()) @foreach($daySlots as $groupKey => $services) @php $first = $services->first(); $selectedStart = \Carbon\Carbon::createFromFormat( 'H:i:s', $first->start_time )->format('h:i A'); $selectedEnd = \Carbon\Carbon::createFromFormat( 'H:i:s', $first->end_time )->format('h:i A'); $selectedClinic = $first->clinic_id; @endphp
- -
@foreach($services as $slot)
{{ $slot->appointment_type }} • {{ $slot->consultation_mode }} • ₹{{ $slot->fee }} @if($slot->discount_value) • Discount: ₹{{ $slot->discount_value }} @endif • {{ $slot->slot_duration }}m
@endforeach @endforeach @else
- -
@endif
@endforeach
Create Service