Posted: 19-08-2017

Laravel 5.5 Responsable Interface

Laravel 5.5  Responsable Interface

Larave 5.5 has a new interface called Responsable that give you the capabilities to objects to be converted to an HTTP response instance when returned from a controller or route closure.

Support Responsable objects.

This is the foundation for allowing objects to be converted into full HTTP responses, allowing more fluent API packages to be built in the future from GITHUB Repo.


Any Responsable object needs to implement a toResponse() method which represents the object as an HTTP response.

Pratical examples about how to implement Responsable Interface can be founds: