@vite(['resources/css/app.css', 'resources/js/app.js']) @livewireStyles @if($tries->count()) @php $i = 0; @endphp @foreach($tries as $k_try => $try) @if($try['status'] === 'Finalizado') @php $i++; @endphp
TENTATIVA {{$i}} (Acertos: {{array_sum($try['points'] ?? 0 )}} / {{$try['quantity'] ?? count($try['correct']) }}) @foreach($try['correct'] as $key => $value) @php $question = $questions->where('correct', 'Like', $value)->first(); if($try['sent'] ?? false) { $color = Illuminate\Support\Str::slug($value) == Illuminate\Support\Str::slug($try['sent'][$key]) ? 'border-green-400' : 'border-red-400'; $sent = $try['sent'][$key]; } else { $color = 'border-red-400'; $sent = 'tentativa falhou!'; } @endphp

EMENTA:{!! $question['question'] ?? '' !!}

CORRETA:{!! $value !!}

ENVIADA:{!! $sent !!}

@endforeach
@endif @endforeach @else

Não houve tentativas válidas para essa atividade.

@endif