@php $t = \App\Tourniers::where('id', $_GET['id'])->first(); $start = date("d.m H:i", $t->start); $end = date("d.m H:i", $t->end); @endphp

{{$t->name}}

{{$start}} - {{$end}}
@php $limit = $t->places + 20; $tournier_table = \App\TournierTable::where('tournier_id', $t->id)->orderBy('scores', 'desc')->limit($limit)->get(); $count_t = 0; $prizes = json_decode($t->prizes); @endphp @foreach($tournier_table as $tt) @php $count_t += 1; @endphp @endforeach
Место Участник Общий выигрыш Приз
#{{($count_t + 1)}}
{{$tt->name}}
{{$tt->scores}}
@if($count_t + 1 <= $t->places) {{$prizes[$count_t]}} @else - @endif