@props([ 'children', 'tableId', 'title' => null, ]) @php $statusMap = [ 'Sponsored' => 'success', 'Registration Cancelled' => 'neutral', 'Graduated' => 'warning', 'Deceased' => 'danger', 'Non Sponsored' => 'info', ]; @endphp # Child Number Name Status Photo Action @forelse ($children as $key => $detail) @php $status = optional($detail->child_status)->status_name ?? 'N/A'; $statusType = $statusMap[$status] ?? 'neutral'; @endphp {{ $key + 1 }} {{ $detail->child_number }} {{ ucfirst($detail->child_fname) . ' ' . ucfirst($detail->child_lname) }} @empty No children found. @endforelse