ViewController
extends Controller
in package
Table of Contents
- $middleware : array<string|int, mixed>
- The middleware registered on the controller.
- $view : Factory
- The view factory implementation.
- __call() : mixed
- Handle calls to missing methods on the controller.
- __construct() : void
- Create a new controller instance.
- __invoke() : View
- Invoke the controller method.
- callAction() : Response
- Execute an action on the controller.
- getMiddleware() : array<string|int, mixed>
- Get the middleware assigned to the controller.
- middleware() : ControllerMiddlewareOptions
- Register middleware on the controller.
Properties
$middleware
The middleware registered on the controller.
protected
array<string|int, mixed>
$middleware
= []
$view
The view factory implementation.
protected
Factory
$view
Methods
__call()
Handle calls to missing methods on the controller.
public
__call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Tags
Return values
mixed —__construct()
Create a new controller instance.
public
__construct(Factory $view) : void
Parameters
- $view : Factory
Return values
void —__invoke()
Invoke the controller method.
public
__invoke(array<string|int, mixed> ...$args) : View
Parameters
- $args : array<string|int, mixed>
Return values
View —callAction()
Execute an action on the controller.
public
callAction(string $method, array<string|int, mixed> $parameters) : Response
Parameters
- $method : string
- $parameters : array<string|int, mixed>
Return values
Response —getMiddleware()
Get the middleware assigned to the controller.
public
getMiddleware() : array<string|int, mixed>
Return values
array<string|int, mixed> —middleware()
Register middleware on the controller.
public
middleware(array<string|int, mixed>|string|Closure $middleware[, array<string|int, mixed> $options = [] ]) : ControllerMiddlewareOptions
Parameters
- $middleware : array<string|int, mixed>|string|Closure
- $options : array<string|int, mixed> = []