trait HasControllerMiddlewareTrait (View source)

Allow objects to have controller middleware.

Methods

string[]
getMiddleware(string $method)

Get middleware.

addMiddleware(string|string[] $middleware)

Add middleware.

middleware(string|string[] $middleware)

Fluent alias for addMiddleware().

Details

string[] getMiddleware(string $method)

Get middleware.

Parameters

string $method

Return Value

string[]

ControllerMiddleware addMiddleware(string|string[] $middleware)

Add middleware.

Parameters

string|string[] $middleware

Return Value

ControllerMiddleware

ControllerMiddleware middleware(string|string[] $middleware)

Fluent alias for addMiddleware().

Parameters

string|string[] $middleware

Return Value

ControllerMiddleware