@csrf
@php $prevStudentId = null; // Initialize the previous student ID variable @endphp @foreach($DataSet as $index => $data) @if ($index === 0 || $data['room_no'] !== $DataSet[$index - 1]['room_no']) @endif @if ($data['student_id'] == $prevStudentId && $prevStudentId != null) @php continue @endphp @else @if ($data['count'] > 0 && (!isset($DataSet[$index + 1]['student_id']) || $DataSet[$index + 1]['student_id'] == $data['student_id']) && ($index === 0 || $DataSet[$index - 1]['student_id'] != $data['student_id'] || $data['student_id'] == '' ) ) @elseif($data['count'] > 0 && ($index === 0 || $DataSet[$index - 1]['student_id'] == $data['student_id']) && !empty($Dataset[$index]['student_id']) ) @else @endif @php $prevStudentId = $data['student_id']; // Update the previous student ID @endphp @endif @endforeach
Bed Id No Resident
No
Name Department Admission
Session
Academic
Program
Year Class
Roll
Mobile Guardian
Mobile
Local Guardian
Mobile
Resident Date Establishment
fee paid upto
Remarks
Room {{ $data['room_no'] }} @if(isset($data['add_ht'])) - {{ $data['add_ht'] }} @endif
{{ $data['seat'] }}
{{ $data['seat'] }} {!! $data['hallid'] !!} {{ $data['resident_no'] }} {{ $data['s_name'] }} {{ $data['department'] }} {{ $data['admission'] }} {{ $data['program'] }} {{ $data['year'] }} {{ $data['roll'] }} {{ $data['mobile'] }} {{ $data['parent_no'] }} {{ $data['local_no'] }} {{ $data['res_date'] }} {!! $data['remark'] !!}
{{ $data['seat'] }}
{{ $data['seat'] }} {!! $data['hallid'] !!} {{ $data['resident_no'] }} {{ $data['s_name'] }} {{ $data['department'] }} {{ $data['admission'] }} {{ $data['program'] }} {{ $data['year'] }} {{ $data['roll'] }} {{ $data['mobile'] }} {{ $data['parent_no'] }} {{ $data['local_no'] }} {{ $data['res_date'] }} {!! $data['remark'] !!}