@foreach ($mapelusbn as $item) @endforeach @php $no = 1; @endphp @foreach ($data as $row) @php $setting = DB::table('settings')->select('tahun')->orderBy('id','DESC')->first(); $mapel = DB::table('mapelusbns')->SELECT('id')->where('jurusan_id',$row->jurusan_id)->get(); $sum = DB::table('usbns')->where('siswa_id', $row->id)->where('tahun', $setting->tahun)->get()->sum('nilai'); @endphp @foreach ($mapel as $data) @php $usbn = DB::table('usbns')->select('nilai')->where('siswa_id', $row->id) ->where('tahun', $setting->tahun)->where('mapelusbn_id', $data->id)->first(); @endphp @endforeach @endforeach
No NIS NISN Nama Kompetensi{{ $item->nama_mapel }}Rata - Rata
{{ $no++ }} {{ $row->nis }} {{ $row->nisn }} {{ $row->nama }} {{ $row->kompetensi }}{{ round(old('bln', !empty($usbn) ? $usbn->nilai : 0)) }}{{ number_format(round($sum)/$count,2) }}