groupBy('status_id') ->pluck('count', 'status_id') ->all(); view()->share('projectStatusStats', $projectsCount); return $next($request); } }