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