laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.71k stars 11.06k forks source link

[Request] Multi-segment, optional wildcard route #150

Closed jackmcdade closed 11 years ago

jackmcdade commented 11 years ago

In SlimPHP I can do the following:

$app->map('/(:segments+)', function ($segments = array()) use ($app) {

To grab the entirety of the url segments and route them with a closure/controller. Can this be done in 4? If not, would something like this be considered?

taylorotwell commented 11 years ago

It can be done:

Route::get('foo/{segments}', function() {})->where('segments', '(.*)');