@php $grand_total = 0; @endphp @foreach ($extraInfo as $rollNo => $rollInfo)
@php $grand_total = $grand_total + 1; @endphp
@endforeach
Center EIIN Roll Reg No Name Subjects Extra
{{ collect($rollInfo)->first()->center_code }} {{ collect($rollInfo)->first()->eiin }} {{ collect($rollInfo)->first()->roll_no }} {{ collect($rollInfo)->first()->registration_no }} {{ collect($rollInfo)->first()->student_name }} @foreach ($rollInfo as $extra => $item) @if ($item->extra == 'F') {{ $item->subject_code }}-{{ $item->status }}, @endif @endforeach @foreach ($rollInfo as $extra => $item) @if ($item->extra == 'T') {{ $item->subject_code }}-{{ $item->status }}, @endif @endforeach

Total Students: {{$grand_total}}