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