A route is a pattern for a URL to which a specific view can be loaded and displayed.
Routes always begin with a slash /. A route can have fixed components, but also parameters that must be specified or are optional.
Specify parameters in routes as follows: {name}
Pattern for optional components of the URL
Optional components of a route are enclosed in square brackets [].
Examples:
/view/{param1}[/{param2}]
Typing and validation of parameters
You can use regular expressions (RegEx) in a route to restrict parameters. In this way, you ensure that only the range in the regular expression is accepted for the parameter. If you specify a route parameter that no longer matches the regular expression, you will receive an error message.
Examples:
/view/{param1:\d+}[/{param2:fo*}]