Skip to content

Configuration

whereNumber()

whereNumber() — returns struct

Available in: mapper Category: Routing

Constrain a route variable to only match numeric values (digits). Similar to Laravel’s whereNumber() or ASP.NET’s :int constraint.

NameTypeRequiredDefaultDescription
variableNamestringyesThe route variable name to constrain (e.g., "id"). Can also be a comma-delimited list to constrain multiple variables.