Skip to content

Configuration

root()

root() — returns struct

Available in: mapper Category: Routing

Create a route that matches the root of its current context. This mapper can be used for the application’s web root (or home page), or it can generate a route for the root of a namespace or other path scoping mapper.

NameTypeRequiredDefaultDescription
tostringnoSet controller##action combination to map the route to. You may use either this argument or a combination of controller and action.
mapFormatbooleannoSet to true to include the format (e.g. .json) in the route.