@extends('layouts.app') @section('link') @endsection @section('style') @endsection @section('content')
@include('shared.messages')

{{$tournament->name}}

@if(count($tournament->matches)>0) @endif
@foreach($tournament->rounds as $round)

{{$round->name}}

@foreach($matches->where('round_id',$round->id) as $index=>$match)
{{$match->user1_id!=0 ? $match->user1->name : ''}} @if(count($match->sets)>0) @foreach($match->sets as $set) {{$set->user_1_result}} @endforeach @endif
@if($match->winner_id==0)
{{$match->start_time!=null ? date('d.m.Y H:i',strtotime($match->start_time)): ""}}
@endif
{{$match->user2_id!=0 ? $match->user2->name : ''}} @if(count($match->sets)>0) @foreach($match->sets as $set) {{$set->user_2_result}} @endforeach @endif
@endforeach
@if($round->roundrounds))
@while($kwhere('round_id',$round->id))/2)
@endwhile
@endif @endforeach
@endsection