route($this->getLoginRoute()); } return $next($request); } // Allow components to specify their login route abstract protected function getLoginRoute(): string; }