src/Leevel/Router/Provider/Register.php
protected function redirect(): void
    {
        $this->container->singleton('redirect', function (IContainer $container) {
            $redirect = new Redirect($container['url']);

            if (isset($container['session'])) {
                $redirect->setSession($container['session']);
            }

            return $redirect;
        });
    }
protected function redirect(): void
    {
        $this->container->singleton('redirect', function (IContainer $container) {
            $redirect = new Redirect($container['url']);

            if (isset($container['session'])) {
                $redirect->setSession($container['session']);
            }

            return $redirect;
        });
    }
注册 redirect 服务