I am using laravel 4 for a cms project and I have some problems with my routes ...
These are my current routes.
Route::get('/', 'IndexController@showNews');
Route::get('/logout', 'UserController@logout');
Route::resource('/login', 'UserController');
Route::resource('/user', 'UserController@index');
Route::resource('/user/{route}', 'UserController');
Route::get('/{page}', 'IndexController@showPage');
Route::get('/{page}/{id}', 'IndexController@showPage');
To my user routes, I have a custom router that routes user information around, not a problem. But all this works fine, but when I try to go to "/ test", which will link to the test page, it gives me this error.
Route pattern "/user/{route}/{{route}}" cannot reference variable name "route" more than once.
It fits the logic of the router, and I'm pretty new to laravel. Is there any way around this problem? This is a collision between user / route and wildcards / routes.
source
share