@extends('site.layouts.master') @section('content')
من
{{-- نتیجه تا الان --}}

{{-- {{ $tournament->selfCorrects() }} - {{ $tournament->opponentCorrects() }} --}} {{ $tournament->selfCorrects() }} {{ $tournament->opponentCorrects() }}

{{-- {{ $tournament::STATUS[$tournament->status] }} --}}
{{ $tournament->opponent->name }}
@if($tournament->turn->id != auth()->id())
{{ $tournament::STATUS[$tournament->status] }}
@endif
@foreach ($tournament->selfQuestions as $item) @php $selfStatus = 'شروع نشده'; $selfStatusClass = ''; if($item->correct == '0' || $item->correct == '1'){ $selfStatus = $item->correct == '1' ? '' : ''; $selfStatusClass = $item->correct == '1' ? 'yes-rank' : 'no-rank'; } if($tournament->turn_id == auth()->id()){ $notAnswerd = $tournament->selfQuestions()->where('answer', '!=', null)->count(); $selfTurn = $notAnswerd == 1 ? $notAnswerd + 1 : $notAnswerd + 1; if($loop->iteration == $selfTurn && $tournament->winner_id == null){ $selfStatus = 'شروع کن'; $selfStatusClass = 'start-rank'; } } @endphp
@if ($selfStatusClass == 'start-rank')
{!! $selfStatus !!}
@else
{!! $selfStatus !!}
@endif
@endforeach
@foreach ($tournament->opponentQuestions as $item) @php $opponentStatus = 'شروع نشده'; $opponentStatusClass = ''; if($item->correct == '0' || $item->correct == '1'){ $opponentStatus = $item->correct == '1' ? '' : ''; $opponentStatusClass = $item->correct == '1' ? 'yes-rank' : 'no-rank'; } @endphp
{!! $opponentStatus !!}
@endforeach
@endsection {{--@section('scripts')--}} {{-- --}} {{--@endsection--}}