I copied an example from the laravel documentation:
public function postResetPassword() { $credentials = array('email' => Input::get('email')); return Password::reset($credentials, function($user, $password) { $user->password = Hash::make($password); $user->save(); return Redirect::to('/'); }); } But it seems that returning Redirect::to('/') doesn't work, because instead of home page I get an error which tells that controller method is not found. But if I write the code this way:
$credentials = array('email' => Input::get('email')); Password::reset($credentials, function($user, $password) { $user->password = Hash::make($password); $user->save(); }); return Redirect::back(); It works, though I can't understand how do I get session flash variables (actually I get them).
Another question is where are the rules about password length (6 chars) are written? Can I change them?