When defining a route in Laravel 4 is it possible to define multiple URI paths within the same route?
presently i do the following:
Route::get(\'/\'
I believe you need to use an optional parameter with a regular expression:
Route::get('/{name}', array(
'as' => 'dashboard',
'uses' => 'DashboardController@index')
)->where('name', '(dashboard)?');
* Assuming you want to route to the same controller which is not entirely clear from the question.
* The current accepted answer matches everything not just /
OR /dashboard
.