Closure
Less than 1 minute
Closure
Class Closure.
This class extends the base Controller class and is designed to handle closures. It provides functionality to execute a closure and return a response based on the closure's output.
Properties
name
protected string $name = 'closure'public $Methods
__construct
public __construct(Request $request, \Closure $closure): voidParameters
| Parameter | Type | Description |
|---|---|---|
$request | Request | |
$closure | \Closure |
__default
Executes the closure associated with this controller and returns a Response.
public __default(string $controller, string $action, mixed $actionArgs): ResponseParameters
| Parameter | Type | Description |
|---|---|---|
$controller | string | the name of the controller (not used in this implementation) |
$action | string | the name of the action (not used in this implementation) |
$actionArgs | mixed | the arguments to pass to the closure |
Generated by Hazaar API Doc Generator on Sun, 01 Mar 2026 09:22:26 +0000