Configuration
whereNumber()
Signature
Section titled “Signature”whereNumber() — returns struct
Available in: mapper
Category: Routing
Description
Section titled “Description”Constrain a route variable to only match numeric values (digits). Similar to Laravel’s whereNumber() or ASP.NET’s :int constraint.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
variableName | string | yes | — | The route variable name to constrain (e.g., "id"). Can also be a comma-delimited list to constrain multiple variables. |