المستخدم: {{ $submission->user->name }}

النتيجة: {{ $submission->score }}%

@foreach ($submission->answers as $index => $ans)

{{ $index + 1 }}. {{ $ans->question->question }}

{{-- إجابة المستخدم --}}
إجابتك: {{ $ans->answer->answer_text }}
{{-- الإجابة الصحيحة --}} @if(!$ans->is_correct)
الإجابة الصحيحة: {{ $ans->question->answers->where('is_correct', 1)->first()->answer_text }}
@endif
@endforeach