class HandlePrecognitiveRequests (View source)

Properties

protected Container $container

The container instance.

Methods

void
__construct(Container $container)

Create a new middleware instance.

handle(Request $request, Closure $next)

Handle an incoming request.

void
prepareForPrecognition(Request $request)

Prepare to handle a precognitive request.

appendVaryHeader(Request $request, Response $response)

Append the appropriate "Vary" header to the given response.

Details

void __construct(Container $container)

Create a new middleware instance.

Parameters

Container $container

Return Value

void

Response handle(Request $request, Closure $next)

Handle an incoming request.

Parameters

Request $request
Closure $next

Return Value

Response

protected void prepareForPrecognition(Request $request)

Prepare to handle a precognitive request.

Parameters

Request $request

Return Value

void

protected Response appendVaryHeader(Request $request, Response $response)

Append the appropriate "Vary" header to the given response.

Parameters

Request $request
Response $response

Return Value

Response $response