Framework: [Request] Multi-segment, optional wildcard route

Created on 25 Jan 2013  路  1Comment  路  Source: laravel/framework

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?

Most helpful comment

It can be done:

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

>All comments

It can be done:

Route::get('foo/{segments}', function() {})->where('segments', '(.*)');
Was this page helpful?
0 / 5 - 0 ratings

Related issues

shopblocks picture shopblocks  路  3Comments

digirew picture digirew  路  3Comments

YannPl picture YannPl  路  3Comments

klimentLambevski picture klimentLambevski  路  3Comments

JamborJan picture JamborJan  路  3Comments