I have password change form and there's two fields in it: old_password
and new_password
.
I'm stuck with validator for old password, here's what I done:
Validator::extend('old_password', function($attribute, $value) use ($user) {
return $user->password === Hash::make($value);
});
But Hash::make($value)
always generates different result with the same $value
.
How can I make validator to match current user password?