{{-- resources/views/emails/contractor-rejected-drivers.blade.php --}}
Some of your driver registrations have been rejected.
Dear {{ $contractor->company_name ?? $contractor->name ?? 'Contractor' }},
We would like to inform you that the following driver(s) have been rejected in our system:
| # | Driver Name | IC / ID | Truck # | Licence Validity | |
|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $driverName }} | {{ $employee->email ?? '—' }} | {{ $driverId }} | {{ $truckNo }} | {{ $licence }} |
Please review the above drivers and update their information if needed. You can resubmit their details through the contractor portal once the issues have been resolved.
{{-- Build WhatsApp message from all drivers --}} @php $lines = []; foreach ($employees as $idx => $employee) { $num = $idx + 1; $name = $employee->name ?? $employee->full_name ?? 'N/A'; $email = $employee->email ?? '—'; $idNo = $employee->passport_no ?? $employee->identification_no ?? $employee->ic_no ?? $employee->ic_cnic ?? '—'; $truckNo = $employee->truck_no ?? $employee->truck_number ?? $employee->truck_registration_no ?? '—'; $licence = $employee->licence_validity ?? $employee->license_validity ?? null; if ($licence) { try { $licence = \Illuminate\Support\Carbon::parse($licence)->format('Y-m-d'); } catch (\Throwable $e) { // leave as raw } } else { $licence = '—'; } $lines[] = "{$num}. {$name} | {$email} | IC: {$idNo} | Truck: {$truckNo} | Licence: {$licence}"; } $waText = "Rejected drivers for " . ($contractor->company_name ?? $contractor->name ?? 'contractor') . ":\n\n" . implode("\n", $lines); $waLink = 'https://wa.me/?text=' . rawurlencode($waText); @endphp
Regards,
SmartPass Team