class Illuminate / Routing / Controllers / Middleware

Middleware

Properties

public

$middleware Closure |string|array

The middleware that should be assigned.

Default: null
public

$only array|null

The controller methods the middleware should only apply to.

Default: null
public

$except array|null

The controller methods the middleware should not apply to.

Default: null

Methods

public

__construct ( $middleware ) : void

Create a new controller middleware definition.

Parameters

public

only ( $only ) : $this

Specify the only controller methods the middleware should apply to.

Parameters

  • $only array|string
public

except ( $except ) : $this

Specify the controller methods the middleware should not apply to.

Parameters

  • $except array|string