Global Helpers
controller()
Signature
Section titled “Signature”controller() — returns any
Available in: controller, model, migrator
Category: Miscellaneous Functions
Description
Section titled “Description”Creates and returns a controller object with your own custom name and params. Used primarily for testing purposes.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | yes | — | Name of the controller to create. |
params | struct | no | [runtime expression] | The params struct (combination of form and URL variables). |
Examples
Section titled “Examples”testController = controller("users", params);