@foreach(range(1, $soals->count()) as $index) @endforeach @foreach($pesertas as $fil) @php $benar = 0; @endphp @foreach($soals as $soal) @endforeach @endforeach
No{{ $index }}Benar
{{ $fil['peserta']['nama'] }}
{{ $fil['peserta']['no_ujian'] }}
@php $filtered = collect($fil['data'])->firstWhere('soal_id', $soal->id); if($filtered != '') { $benar += $filtered->iscorrect; } @endphp {{ $filtered != '' ? $filtered->iscorrect : '-' }} {{ $benar }}