@php use Carbon\Carbon; @endphp REKAPITULASI ABSENSI - {{ $kelas->name }}

REKAPITULASI ABSENSI

{{ $sekolah->name ?? '' }}

{{ $sekolah->alamat ?? '' }}


Kelas : {{ $kelas->name }}
Wali Kelas : {{ $kelas->guru->name }}
Tahun Pelajaran : {{ $kelas->tapel->tahun_pelajaran }} Semester {{ $kelas->tapel->semester }}
Bulan : {{ $monthIndo }}

@foreach ($siswa as $index => $item) @php $H = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['H']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); $S = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['S']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); $I = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['I']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); $A = $absen->where('siswa_id', $item->id) ->whereIn('keterangan', ['A']) ->where('tanggal', '>=', $months[0]) ->where('tanggal', '<=', end($months)) ->whereNotIn('tanggal', $libur->pluck('tgl')) ->count(); @endphp @endforeach
# NIS Nama Siswa L/P Jumlah
H S I A
{{ $loop->iteration }} {{ $item->nis }} {{ $item->name }} {{ $item->jk }}{{ $H > 0 ? $H : '' }} {{ $S > 0 ? $S : '' }} {{ $I > 0 ? $I : '' }} {{ $A > 0 ? $A : '' }}