Skip to content

Configuration

scope()

scope() — returns struct

Available in: mapper Category: Routing

Set any number of parameters to be inherited by mappers called within this matcher’s block. For example, set a package or URL path to be used by all child routes.

NameTypeRequiredDefaultDescription
namestringnoName to prepend to child route names for use when building links, forms, and other URLs.
pathstringnoPath to prefix to all child routes.
packagestringnoPackage namespace to append to controllers.
controllerstringnoController to use for routes.
shallowbooleannoTurn on shallow resources to eliminate routing added before this one.
shallowPathstringnoShallow path prefix.
shallowNamestringnoShallow name prefix.
constraintsstructnoVariable patterns to use for matching.
middlewareanyno
bindinganyno
$callstringnoscope