@auth
@if (!auth()->user()->hasPollVoted($poll->id) && $poll->poll_ends >= now())
@foreach ($choices as $choice)
@endforeach
@else
@foreach ($choices as $choice)
@if ($poll->votes->count())
{{ $choice->text }}
@if (auth()->user()->isChosenByUser(getCurrentUser()->id, $choice->id))
@endif
{{ round(($choice->votes->count() / $poll->votes->count()) * 100, 2) . '%' }}
@endif
@endforeach
@endif
@else
@if ($poll->poll_ends < \Carbon\Carbon::now())
@foreach ($choices as $choice)
@if ($poll->votes->count())
{{ $choice->text }}
{{ round(($choice->votes->count() / $poll->votes->count()) * 100, 2) . '%' }}
@endif
@endforeach
@else
@foreach ($choices as $choice)
@if ($poll->votes->count() > 0)
{{ __('Total votes') }}
{{ $poll->votes()->count() }}
@endif
{{ $poll->displayHumanTimeLeft() }}