Laravel 5.5 Responsable Interface for Responses

Published: 25/07/2017
Laravel 5.5 Responsable Interface for Responses
Source: LARAVEL-NEWS.COM

A new return type will be supported in Laravel 5.5 routes: the Responsable interface. This contract allows objects to be converted to an HTTP response instance when returned from a controller or route closure. A Responsable object needs to implement a toResponse() method which represents the object as an HTTP response. <?php use Illuminate\Contracts\Support\Responsable; class ExampleObject i

Read more
Related news
Comment
FACEBOOK