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(\Closure $closure): voidParameters
| Parameter | Type | Description |
|---|---|---|
$closure | \Closure |
run
Executes the closure associated with this controller and returns a Response.
public run(?Route $route): ResponseParameters
| Parameter | Type | Description |
|---|---|---|
$route | Route | optional route parameter |
Generated by Hazaar API Doc Generator on Mon, 27 Oct 2025 13:01:29 +0000