@extends('superadmin.layout.app') @section('title', 'Count') @push('headerscript') @endpush @section('content')

Count

{{-- Add News
--}}

Total Voters :- {{ $value1 }}

100%

Complete Voting :- {{ $value3 }}

{{ number_format((float) $comeplete, 2, '.', '') }}%

Pending Voting :- {{ $value2 }}

{{ number_format((float) $panding, 2, '.', '') }}%
@php if ($voterlist) { foreach ($voterdata as $r) { } } @endphp @foreach ($voterdata as $r) @php $total = App\Models\VoterList::where('status','1')->where('area_name', $r->area_name)->count(); $complete="0"; $panding="0"; if($total!="0"){ $complete = App\Models\VoterList::where('status', 1)->where('area_name', $r->area_name) ->where('voter_verified', 2) ->count(); $panding = App\Models\VoterList::where('status', 1)->where('area_name', $r->area_name) ->where('voter_verified', 1) ->count(); $comepleteP = ($complete / $total) * 100; $pangingP = ($panding / $total) * 100; if ($pangingP >= '60%') { $valueP = '' . number_format((float) $pangingP, 2, '.', '') . '%'; } elseif ($pangingP <= '40%') { $valueP = '' . number_format((float) $pangingP, 2, '.', '') . '%'; } else { $valueP = '' . number_format((float) $pangingP, 2, '.', '') . '%'; } } @endphp @endforeach
Area Name Total Complete Pending Complete % Pending %
{{ $r->area_name }} {{ $total }} {{ $complete }} {{ $panding }} @if ($comepleteP >= '60%') {{number_format((float) $comepleteP, 2, '.', '')}}% @elseif($comepleteP <= '40%') {{number_format((float) $comepleteP, 2, '.', '')}}% @else {{number_format((float) $comepleteP, 2, '.', '')}}% @endif @if ($pangingP >= '60%') {{number_format((float) $pangingP, 2, '.', '')}}% @elseif($pangingP <= '40%') {{number_format((float) $pangingP, 2, '.', '')}}% @else {{number_format((float) $pangingP, 2, '.', '')}}% @endif
@endsection @push('footerscript') @endpush