Book an Appointment
Schedule your next dental visit at PKU UPSI
@php $role = session('login_role'); $rolePath = $role === 'staff' ? 'staff' : 'student'; $portal = $role === 'staff' ? 'STAFF PORTAL' : 'STUDENT PORTAL'; $rawAvailableDates = $availableDates ?? []; $availableDates = array_keys($availableDates ?? []); $today = now()->format('Y-m-d'); $availableDates = array_values(array_filter($availableDates, function($date) use ($today) { return $date >= $today; })); $monthStart = $monthStart ?? now()->format('Y-m-01'); $prevMonth = $prevMonth ?? date('Y-m', strtotime($monthStart.' -1 month')); $nextMonth = $nextMonth ?? date('Y-m', strtotime($monthStart.' +1 month')); $year = date('Y', strtotime($monthStart)); $month = date('m', strtotime($monthStart)); $monthName = date('F Y', strtotime($monthStart)); $daysInMonth = date('t', strtotime($monthStart)); $firstDay = date('N', strtotime($monthStart)); $patientName = $profile['full_name'] ?? 'Patient'; $type = session('booking_appointment_type') ?? 'Dental Check-Up'; $firstAvailable = ''; foreach ($availableDates as $date) { if (date('Y-m', strtotime($date)) === date('Y-m', strtotime($monthStart))) { $firstAvailable = $date; break; } } if (!$firstAvailable) { $firstAvailable = $availableDates[0] ?? ''; } @endphp
Schedule your next dental visit at PKU UPSI