@php $i = 0; @endphp
{{-- --}} {{-- --}} @foreach ($students as $index => $student) @php $academicyears = [1 => '1st', 2 => '2nd', 3 => '3rd', 4 => '4th', 5 => '5th']; @endphp {{-- Add similar checks for other fields --}} {{-- Add similar checks for other fields --}} @endforeach
SL Student Hall ID Resident No Admission
Session
Program Academic
Year
Department Registration
No
Mobile No Resident
Date
SeatRoom FloorBuildingStatus
{{ ++$i }} {{ isset($student['full_name_en']) ? $student['full_name_en'] : '' }} {{ isset($student['hall_id']) ? $student['hall_id'] : '' }} {{ isset($student['resident_no']) ? $student['resident_no'] : '' }} {{ isset($student['admission']) ? $student['admission'] : '' }} {{ isset($student['statusname']) ? $student['statusname'] : '' }} {{ isset($student['year']) && isset($academicyears[$student['year']]) ? $academicyears[$student['year']] : '' }} {{ isset($student['dept_name']) ? $student['dept_name'] : '' }} {{ isset($student['registration_no']) ? $student['registration_no'] : '' }} {{ isset($student['mobile_no']) ? $student['mobile_no'] : '' }} {{ isset($student['date']) ? (new DateTime($student['date']))->format('d-m-Y') : '' }} {{ isset($student['seat_no']) ? $student['seat_no'] : '' }}{{ isset($student['name']) ? $student['name'] : '' }}