Skip to content

Global Helpers

controller()

controller() — returns any

Available in: controller, model, test, migrator, migration, tabledefinition Category: Miscellaneous Functions

Creates and returns a controller object with your own custom name and params. Used primarily for testing purposes.

NameTypeRequiredDefaultDescription
namestringyesName of the controller to create.
paramsstructno[runtime expression]The params struct (combination of form and URL variables).
testController = controller("users", params);