Laravel\Lumen\Concerns\RoutesRequests::prepareResponse PHP Method

prepareResponse() public method

Prepare the response for sending.
public prepareResponse ( mixed $response ) : Illuminate\Http\Response
$response mixed
return Illuminate\Http\Response
    public function prepareResponse($response)
    {
        if ($response instanceof PsrResponseInterface) {
            $response = (new HttpFoundationFactory())->createResponse($response);
        } elseif (!$response instanceof SymfonyResponse) {
            $response = new Response($response);
        } elseif ($response instanceof BinaryFileResponse) {
            $response = $response->prepare(Request::capture());
        }
        return $response;
    }