@extends('layouts.app') @section('title', 'Patient Dashboard') @section('content')

Doctor Details : About {{ $data['name'] }}

Doctor
{{ $data['name'] }}

{{ is_array($data['specialization']) ? implode(', ', $data['specialization']) : ($data['specialization'] ?? 'N/A') }} {{ $data['rating'] ?? '0' }} ({{ $data['reviews_count'] ?? '0' }} reviews)

 Book Consultation
Details

{{ $data['bio'] ?? 'No bio available.' }}

@if($data['education']->isNotEmpty())
Education
    @foreach($data['education'] as $edu)
  • {{ $edu->degree }} - {{ $edu->institute }} ({{ $edu->year ?? 'N/A' }})
  • @endforeach
@endif @if($data['experiences']->isNotEmpty())
Experience
    @foreach($data['experiences'] as $exp)
  • {{ $exp->position }} at {{ $exp->organization }} ({{ $exp->start_year ?? 'N/A' }} - {{ $exp->end_year ?? 'Present' }})
  • @endforeach
@endif
Consultation Type
Upcoming Slots

Today

Tomorrow

@php // Ensure availability is a Collection (safe even if controller passed array or null) $availabilities = collect($data['availability'] ?? []); // Group by day (normalize to lowercase). If your DB stores weekday names use that; otherwise adapt mapping. $grouped = $availabilities->groupBy(function($item) { return strtolower(data_get($item, 'day', 'unknown')); }); @endphp @if($grouped->isEmpty())

No availability slots found.

@else @foreach($grouped as $day => $slots)

{{ ucfirst($day) }}

@foreach($slots as $slot)
From: {{ data_get($slot, 'from_time') ? \Carbon\Carbon::parse(data_get($slot, 'from_time'))->format('h:i A') : 'N/A' }}
To: {{ data_get($slot, 'to_time') ? \Carbon\Carbon::parse(data_get($slot, 'to_time'))->format('h:i A') : 'N/A' }}
Duration: {{ data_get($slot, 'slot_duration', 'N/A') }} mins
Time Slot: {{ data_get($slot, 'time_slot', 'N/A') }}
In-Person: ₹{{ number_format(data_get($slot, 'in_person_fee', 0), 0) }}
Video: ₹{{ number_format(data_get($slot, 'video_fee', 0), 0) }}
{{ data_get($slot, 'status') == 1 ? 'Available' : 'Unavailable' }}
@endforeach
@endforeach @endif
@endsection