Laravel4路由模式错误

I´m using laravel 4 for a cms project, and i´m having 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');


// Routes that shows us the pages...
Route::get('/{page}', 'IndexController@showPage');
Route::get('/{page}/{id}', 'IndexController@showPage');

To my user routes i have a custom router that routes the user information around, not really a problem. But all of that works great, but when i try to navigate to "/test" Wich would link to a test page, it gives me this error.

Route pattern "/user/{route}/{{route}}" cannot reference variable name "route" more than once.

It comes up to router logic, and i´m fairly new to laravel. Is there a way for me to work around this problem? It´s a collision between the user/route and the /route wildcards.

Route::resource('/user', 'UserController@index');
Route::resource('/user/{route}', 'UserController');

The problem is that you are using Route::resource to declare the routes, while by using Route::resource you are actually declaring a RESTful controller with a table of actions to be handled by Laravel automatically. You are using it incorrectly.

See the docs to see which routes are handled in the background (and hence the source of the conflict):

Take a look at the table called Actions Handled By Resource Controller

For any route handler that is not within the table you will have to declare separate routes. Something like:

Route::get('foo/filter/{filterName}/{filterValue}',
        array('as'=>'filteredroute','uses'=>'FooController@filter'))

As a summary, Route::resource enables you quick CRUD RESTful access.