Level 13
I think it is something like this in Lumen:
$app->get('foo/{segments}', function() {})->where('segments', '(.*)');
Is it possible to match an unlimited amount of segments as one with lumen's router? (I found this for laravel).
Ex. /foo/{somekindofwildcard} would match /foo/bar, /foo/bar/baz, etc.
That actually didn't work either, but pushed me in the right direction. This is how I got it to work:
$app->get('/{foo:.*}', function($foo) {
// ...
});
Please or to participate in this conversation.