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