Check for old password to confirm account update

Hey Guys! I'm thinking about an option which lets the user update their data. For validation i use Request but i don't know how i can check if the current password is equal to that in the databse. How can i validate it?

duxet replied 3 years ago
Validator::extend('user_password', function ($attribute, $value, $parameters) {
    return Hash::check($value, Auth::user()->password);

That's my solution.

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us