protected function registerResponse()
    {
        $this->app->singleton('response.factory', function ($app) {
            $factory = new ResponseFactory(
                $app['redirect']
            );

            $factory->setViewResolver(function() use ($app) {
                return $app['view'];
            });

            return $factory;
        });
    }