Responsable.php
TLDR
This file contains the Responsable
interface, which is responsible for creating an HTTP response that represents an object.
Methods
toResponse($request)
This method is responsible for creating an HTTP response that represents the object. It accepts an instance of the Illuminate\Http\Request
class as a parameter and returns an instance of the Symfony\Component\HttpFoundation\Response
class.
<?php
namespace Illuminate\Contracts\Support;
interface Responsable
{
/**
* Create an HTTP response that represents the object.
*
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function toResponse($request);
}