@extends('front.layout.app') @section('main_content')

{{ PREVIOUS_POLLS }}

@foreach($online_poll_data as $item) @if($loop->iteration == 1) @continue @endif @php $total_vote = $item->yes_vote+$item->no_vote; if($item->yes_vote == 0) { $total_yes_percentage = 0; } else { $total_yes_percentage = ($item->yes_vote*100)/$total_vote; $total_yes_percentage = ceil($total_yes_percentage); } if($item->no_vote == 0) { $total_no_percentage = 0; } else { $total_no_percentage = ($item->no_vote*100)/$total_vote; $total_no_percentage = ceil($total_no_percentage); } @endphp
{{ $item->question }}
@php $ts = strtotime($item->created_at); $updated_date = date('d F, Y',$ts); @endphp {{ POLL_DATE }} {{ $updated_date }}
{{ TOTAL_VOTES }} {{ $total_vote }}
{{ YES }} ({{ $item->yes_vote }})
{{ $total_yes_percentage }}%
{{ NO }} ({{ $item->no_vote }})
{{ $total_no_percentage }}%
@endforeach
@endsection