@extends('frontend.layouts.main') @section('title') {{ __('Raffle') }} @endsection @section('content') @if(!$raffle) @else @if($raffle->is_completed)
{{ __('Raffle is completed') }}
@if($raffle->win_amount > 0)

{{ $raffle->winner->name }} {{ __('won :x credits', ['x' => $raffle->_win_amount]) }}

@else

{{ __('This raffle has no winner.') }}

@endif
@else
{{ __('Raffle is in progress') }}

{{ __('Win up to :n credits', ['n' => $raffle->_max_win_amount]) }}

@if($raffle->is_end_date_passed || $raffle->getMaxTicketsUserCanPurchase(auth()->user()) == 0)

{{ __('You can not purchase tickets at this time.') }}

@else

{{ __('Purchase raffle tickets.') }} {{ __('A random ticket will be drawn at the end of the raffle.') }} {{ __('The ticket owner will win the pot, which equals :pct% of all purchased tickets value.', ['pct' => $raffle->pot_size_pct]) }} {{ __('The more tickets you purchase, the more chances you have to win.') }}

@csrf
@endif
@endif @if($participants->count())

{{ __('Participants') }}

@foreach ($participants as $participant) @endforeach
{{ __('User') }} {{ __('Tickets') }} {{ __('Last purchased') }}
{{ $participant->user->name }} @if($raffle->is_completed && $raffle->winner->id == $participant->user->id) {{ __('winner') }} @endif {{ $participant->tickets_count }} {{ $participant->last_purchased->diffForHumans() }}
@endif
{{ __('View past raffles') }}
@endif @endsection