new ResponseFactory implementation
Hi All,
We're using lumen on a set of Micro services and would be helpful to have our own ResponseFactory so we can attach our mappers/transformer for different type of objects, we do know how to do this on current 5.1 branch, but it would be useful if available to everyone in a Lumen way.
1: Create a abstract response factory with responsibility to generate ResponseFactory instances, defaults to current ResponseFactory, and allow attach new ResponseFactories. response() helper would use the Abstract factory with a parameter (prob from env)
https://github.com/laravel/lumen-framework/pull/294/files
2: Change helper to use a ResponseFactory registered in the container and defaulting to current ResponseFactory (not really sure how to implement this, is the container available on helper register?)
Any other suggestions?
Please or to participate in this conversation.