@extends('layouts.app') @section('title', $evento->nombre) @section('content')

{{ $evento->nombre }}

Volver

Información del Evento

Fecha:
{{ format_date_es($evento->fecha_evento) }}
Horario:
{{ format_time_range_12h($evento->hora_inicio, $evento->hora_fin) }}
@if($evento->cancha)
Cancha:
{{ $evento->cancha->nombre }}
Ubicación:
{{ $evento->cancha->ubicacion }}
@endif
Participantes:
{{ $evento->participantes->count() }}/{{ $evento->max_participantes }}
Precio:
@if($evento->precio > 0) ${{ number_format($evento->precio, 0, ',', '.') }} @else Gratis @endif
@if($evento->descripcion)
Descripción:
{{ $evento->descripcion }}
@endif @php $yaParticipa = $evento->participantes->contains('id', auth()->id()); $eventoLleno = $evento->participantes->count() >= $evento->max_participantes; $fechaPasada = \Carbon\Carbon::parse($evento->fecha_evento)->isPast(); @endphp
@if($yaParticipa)
Ya estás participando en este evento
@elseif($fechaPasada) @elseif($eventoLleno)
Este evento ha alcanzado el máximo de participantes
@else @endif
Participantes
@if($evento->participantes->count() > 0)
@foreach($evento->participantes as $participante)
{{ strtoupper(substr($participante->name, 0, 1)) }}
{{ $participante->name }}
{{ $participante->email }}
@endforeach
@else


Aún no hay participantes

@endif
@endsection