How can I do this in Laravel 4
URL::route('auth.reset', array('kh34KHh4K342'))
Instead of
http://domain.tld/auth/reset?kh34KHh4K342
I want to get this :
http://domain.tld/auth/reset/kh34KHh4K342
EDIT
This my routes.php :
The problem is because I have two routes with the same name? How do you explain that ?
Should i set a different name event is the same kind, and different methods
// Set locale
$locale = Request::segment(1);
if(in_array($locale, Config::get('app.languages'))) {
\App::setLocale($locale);
} else {
$locale = null;
}
Route::group(
array( 'prefix' => $locale ), function () {
Route::get('/'), array( 'uses' => 'HomeController@getIndex', 'as' => '/' ));
// Auth
Route::group(
array( 'prefix' => 'auth' ), function () {
// Login
Route::get(
'login', array( 'before' => 'guest',
'uses' => 'UserController@getLogin',
'as' => 'auth.login' )
);
Route::post(
'login', array( 'before' => 'guest|csrf',
'uses' => 'UserController@postLogin',
'as' => 'auth.login' )
);
Route::get(
'reset/{$token}', array( 'uses' => 'UserController@getReset',
'as' => 'auth.reset' )
);
Route::post(
'reset', array( 'uses' => 'UserController@postReset',
'as' => 'auth.reset' )
);
}
);