@php
if (!function_exists('formatStudentNames')) {
function formatStudentNames($students) {
if ($students->isEmpty()) return '';
return $students->map(function ($student) {
return ($student->user->first_name ?? '') . ' ' . ($student->user->last_name ?? '');
})->implode(', ');
}
}
@endphp
| {{ $parent->user->first_name ?? '' }} |
{{ $parent->user->last_name ?? '' }} |
{{ $parent->user->email ?? '' }} |
{{ $parent->user->primary_phone ?? '' }} |
{{ $parent->occupation ?? '' }} |
{{ $parent->workplace ?? '' }} |
{{ $parent->work_phone ?? '' }} |
{{ formatStudentNames($parent->students) }} |
{{ $parent->reason ?? '' }} |
@endforeach