I want to be able to respond to a route in Larvel 3 that contains an unknown number of segments N. e.g.
/segment_1/...segment_N-1/segment_N
The route should send the value of each segment to an anonymous function.
I have tried using:
Route::get('/(:any)/(:all?)', function($segments){
//do something
});
This accepts all routes, but only sends the first segment to the function
Is there a simple way in Laravel to achieve what I need?