The user receives the password reset url in the email which is of format http://example.com/reset/passwordresetcode. I have a route defined for this link as
Route::get('reset/{code}', function(){
return View::make('users.reset_password');
});
On clicking the link in the email, a view containing a form is rendered to reset the password. This form consists of email, password and password confirm fields and I plan to grab the passwordresetcode directly from the url. I have been able to get this passwordresetcode in my view.
Now to process the form post, I have the route defined as:
Route::post('reset', 'UserController@passwordReset');
How can I get the passwordresetcode in this controller action passwordReset? I know I can have a hidden field in my form to receive it on post, but it does not quite look the laravel way and surely there must be a better way. Kind of new to laravel :). Thanks