@php($totalPresent = 0) @php($totalAbsent = 0) @foreach($students as $student) @php($sl = $loop->iteration) @php($attendance = attendanceCheck($data,$student->id)) @if($attendance!=null and $attendance->status==1) @php($status=true) @php($totalPresent++) @else @php($status=false) @php($totalAbsent++) @endif @endforeach
Sl. Name Nick Name Mobile School Photo Present Absent Total Option
{{ $sl }} {{ $student->name }} {{ $student->nick_name }} {{ $student->mobile }} {{ isset($student->school)? $student->school->name : 'Not Found' }} Image {{ $present = attendanceCount($data,$student->id,1) }} {{ $absent = attendanceCount($data,$student->id,2) }} {{ $present + $absent }} {{-- @php($data->student_id = $student->id)--}}