Skip to content

Commit 02e8309

Browse files
authored
Fix code example to correctly store updated token for user (#6930)
1 parent c7aaed8 commit 02e8309

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

passwords.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ Of course, we need to define a route to actually handle the password reset form
123123
function ($user, $password) use ($request) {
124124
$user->forceFill([
125125
'password' => Hash::make($password)
126-
])->save();
126+
])->setRememberToken(Str::random(60));
127127

128-
$user->setRememberToken(Str::random(60));
128+
$user->save();
129129

130130
event(new PasswordReset($user));
131131
}

0 commit comments

Comments
 (0)