@extends('booth.layouts.app') @section('content')

Dashboard

Welcome In Election Diary

Assembly: {{DB::table('vidhan_sabhas')->where('vidhansabha_id',auth()->user()->vidhansahba_id)->value('vidhansabha_title')}}
Booth: {{auth()->user()->booth}}

Male & Female Population total, male, female

Pincode Wise

Favar Wise

{{--

Vidhan Sabha Wise

--}}

Caste Wise

{{--

Graduation

--}}

Age Wise

@endsection @section('script') @php ini_set('memory_limit', '6400M'); ini_set('max_execution_time', '300'); $vidhansabhaname = App\Models\VidhanSabha::where('vidhansabha_id',auth()->user()->vidhansahba_id)->value('vidhansabha_title'); if(Schema::hasTable(Str::lower(preg_replace('/[^A-Za-z0-9-]+/', '', $vidhansabhaname)))){ $tablename = Str::lower(preg_replace('/[^A-Za-z0-9-]+/', '', $vidhansabhaname)); $voterlistData = DB::table($tablename)->where('part_no',Auth::user()->booth)->get(); $voterlist = App\Helpers\CommonClass::voterlist_filter($voterlistData,Auth::user()->create_by); $male = App\Helpers\CommonClass::gender_count($voterlist,'M'); $female = App\Helpers\CommonClass::gender_count($voterlist,'F'); $age = App\Helpers\CommonClass::age_get($voterlist); $pincode = App\Helpers\CommonClass::pincode_get($voterlist); $favar = App\Helpers\CommonClass::favar_get($voterlist); $casteData = App\Helpers\CommonClass::caste_get($voterlist); }else{ $male = 0; $female = 0; $age = array(); $pincode = array(); $favar = array(); $casteData = array(); } @endphp @endsection