Skip to content

Configuration

controller()

controller() — returns struct

Available in: mapper Category: Routing

The controller() function in Wheels is used to define routes that point to a specific controller. However, it is considered deprecated, because it does not align with RESTful routing principles. Wheels encourages using resources() and other RESTful routing helpers instead.

NameTypeRequiredDefaultDescription
controllerstringyes
namestringno[runtime expression]
pathstringno[runtime expression]