@php $current_route = $request->route()->getName(); $approved_count = \App\Models\FixedAssetDeletion::where('status', 1) // ->where('created_by', auth()->user()->id) ->count(); $pending_count = \App\Models\WorkFlowApproval::whereHas('WorkFlow', function ($query) { $query->where('document_type', 16); })->where([ 'status' => 0])->where('type','fixed_assets_deletion')->where('created_by', auth()->user()->id)->count(); // $reverted_count = \App\Models\WorkFlowApproval::whereHas('WorkFlow', function ($query) { // $query->where('document_type', 16); // })->where([ 'status' => 4])->where('type','fixed_assets_deletion')->where('created_by', auth()->user()->id)->count(); $rejected_count = \App\Models\WorkFlowApproval::whereHas('WorkFlow', function ($query) { $query->where('document_type', 16); })->where([ 'status' => 3])->where('type','fixed_assets_deletion')->where('created_by', auth()->user()->id)->count(); @endphp