@extends('layouts.website') @section('link') @endsection @section('content') @include('shared.messages')
@if(auth()->check() && auth()->user()->role_id==4 && $tournament->participants-count($tournament->users)>0 && !in_array(auth()->user()->id,$tournament->users->pluck('id')->toArray()) && count($tournament->matches)==0) id)}}'>Запиши ме @endif @if(auth()->check() && in_array(auth()->user()->id,$tournament->users->pluck('id')->toArray()) && count($tournament->matches)==0) id)}}'>Отпиши ме @endif

{{ $tournament->name }}

Период: @if(date('m.yy',strtotime($tournament->date_from)) === date('m.yy',strtotime($tournament->date_to))) {{date('d',strtotime($tournament->date_from))}} - {{date('d.m.yy',strtotime($tournament->date_to))}} @elseif(date('yy',strtotime($tournament->date_from)) === date('yy',strtotime($tournament->date_to))) {{date('d.m',strtotime($tournament->date_from))}} - {{date('d.m.yy',strtotime($tournament->date_to))}} @else {{date('d.m.yy',strtotime($tournament->date_from))}} - {{date('d.m.yy',strtotime($tournament->date_to))}} @endif
Такса: {{$tournament->fee!=0 ? $tournament->fee.'лв.': 'Без такса'}}
@if(count($tournament->matches)==0)
Свободни места: {{ $tournament->participants-count($tournament->users) }}
@else @endif
@if($tournament->final_match() && $tournament->final_match()->winner_id!=0)
Победител: {{$tournament->final_match()->winner->name}}
@endif
Точкуване:
@foreach($tournament->rounds as $index=>$round) {{$round->name}}: {{$round->points}} точки @endforeach
Точки за спечелени геймове: {{ $tournament->add_points==1 ? 'Да' : 'Не' }}
Участници:
@foreach($tournament->users as $index=>$user) @endforeach
@if($tournament->info!=null)
{!! $tournament->info!!}
@endif
@endsection