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