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

            return (new ResponseFactory($container['view'], $container['redirect']))->
            setViewSuccessTemplate($option->get('view\\success'))->

            setViewFailTemplate($option->get('view\\fail'));
        });
    }
protected function response(): void
    {
        $this->container->singleton('response', function (IContainer $container) {
            $option = $container['option'];

            return (new ResponseFactory($container['view'], $container['redirect']))->
            setViewSuccessTemplate($option->get('view\\success'))->

            setViewFailTemplate($option->get('view\\fail'));
        });
    }
注册 response 服务