@extends('admin.layout.master') @section('content')
@if (Auth::user()->user_type == "super_admin" )
Police Station

{{ App\Models\PoliceStation::get()->count() }}

@endif @if (Auth::user()->user_type == "super_admin" )
Hotline

{{ App\Models\Hotline::get()->count() }}

@endif
Wanted Criminal

{{ App\Models\wanted::get()->count() }}

Total Complain
@if (Auth::user()->user_type == "super_admin" )

{{ App\Models\Complain::where('type','complain')->get()->count() }}

@elseif (App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','complain')->get() && Auth::user()->user_type == "police_station")

{{ App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','complain')->get()->count() }}

@endif
Total Complain
@if (Auth::user()->user_type == "super_admin" )

{{ App\Models\Complain::where('type','GD')->get()->count() }}

@elseif (App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','GD')->get() && Auth::user()->user_type == "police_station")

{{ App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','GD')->get()->count() }}

@endif
Total Pending Complain
@if (Auth::user()->user_type == "super_admin" )

{{ App\Models\Complain::where('type','complain')->where('status','Pending')->get()->count() }}

@elseif (App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','complain')->get() && Auth::user()->user_type == "police_station")

{{ App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','complain')->where('status','Pending')->get()->count() }}

@endif
Total Solved Complain
@if (Auth::user()->user_type == "super_admin" )

{{ App\Models\Complain::where('type','complain')->where('status','Solved')->get()->count() }}

@elseif (App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','complain')->get() && Auth::user()->user_type == "police_station")

{{ App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','complain')->where('status','Solved')->get()->count() }}

@endif
Total Pending GD
@if (Auth::user()->user_type == "super_admin" )

{{ App\Models\Complain::where('type','GD')->where('status','Pending')->get()->count() }}

@elseif (App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','GD')->get() && Auth::user()->user_type == "police_station")

{{ App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','GD')->where('status','Pending')->get()->count() }}

@endif
Total Solved GD
@if (Auth::user()->user_type == "super_admin" )

{{ App\Models\Complain::where('type','GD')->where('status','Solved')->get()->count() }}

@elseif (App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','GD')->get() && Auth::user()->user_type == "police_station")

{{ App\Models\Complain::where('police_station', Auth::user()->police_station )->where('type','GD')->where('status','Solved')->get()->count() }}

@endif
@endsection