class RedirectResponse extends Response (View source)

A collection of tools for the creation of responses

Methods

__construct(Request $request)

Constructor.

ResponseInterface
to(string $url, integer $status = 302)

Get a response redirecting to a specific url.

ResponseInterface
back(string $fallback = '', integer $status = 302)

Get a response redirecting back to the referrer or a fallback.

Details

__construct(Request $request)

Constructor.

Parameters

Request $request

ResponseInterface to(string $url, integer $status = 302)

Get a response redirecting to a specific url.

Parameters

string $url
integer $status

Return Value

ResponseInterface

ResponseInterface back(string $fallback = '', integer $status = 302)

Get a response redirecting back to the referrer or a fallback.

Parameters

string $fallback
integer $status

Return Value

ResponseInterface