@php use Carbon\Carbon; @endphp @foreach ($appointment as $appointments) @php $subject = $appointments->subject ? contactsubject($appointments->subject) : ''; $formattedDate = ''; if (!empty($appointments->created_at)) { $formattedDate = Carbon::parse($appointments->created_at)->format('d-m-Y h:i A'); } $type = (isset($appointments->appointments_type) && $appointments->appointments_type === 'P') ? 'Package' : 'appointments'; @endphp @endforeach
appointment Export
Name Phone email Department Doctor Speciality Date Message
{{ trim(($appointments->title ?? '') . ' ' . ($appointments->firstname ?? '') . ' ' . ($appointments->lastname ?? '')) }} {{ $appointments->phone ?? '' }} {{ $appointments->email ?? '' }} {{ $appointments->department->name ?? 'N/A' }} {{ $appointments->doctor->name ?? 'N/A' }} {{ $appointments->specialty->name ?? 'N/A' }} {{ $formattedDate }} {{ $appointments->message ?? '' }}