@extends('layouts.admin', [ 'page_header' => "Top Students / {$topic->title}", 'dash' => '', 'quiz' => '', 'users' => '', 'questions' => '', 'top_re' => 'active', 'all_re' => '', 'sett' => '' ]) @section('content')
@if ($answers) @foreach ($filtStudents as $key => $student) @endforeach @endif
# Student Name Mobile No. Quiz Total Question Marks Marks You Got
{{$key+1}} {{$student->name}} {{$student->mobile ? $student->mobile : '-'}} {{$topic->title}} {{$c_que*$topic->per_q_mark}} @php $mark = 0; $correct = collect(); @endphp @foreach ($answers as $answer) @if ($answer->user_id == $student->id && $answer->answer == $answer->user_answer) @php $mark++; @endphp @endif @endforeach @php $correct = $mark*$topic->per_q_mark; @endphp {{$correct}}
@endsection