class
Illuminate
/
Routing
/
Controllers
/
Middleware
Middleware
Properties
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
- $middleware Closure |string|array
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