Hot answers tagged

4 votes
Accepted

How can I make route parameters optional in a routing callback?

You can do so by providing a default value for those parameters. path: '/foo/bar/{baz}' defaults: ... baz: 'fallback-value' With your example, it should be something like: $routes['affiliate'] = ...
  • 2,969

Only top scored, non community-wiki answers of a minimum length are eligible