Initially reading the documentation it appears not to support optional URL parameters. But digging into the Fast Route docs it turns out there is some support:
parts of the route enclosed in [...] are considered optional, so that
/foo[bar]will match both
/foobar. Optional parts are only supported in a trailing position, not in the middle of a route.
So you can do something like
It also turns out that Lumen doesn’t strip trailing slashes when parsing URLs so the optional parameters were a useful workaround. I have a few routes like