Monday, March 13, 2017

Require previous password as validation to save settings in Laravel

I want people to have to enter their password when they want to change it.

This is how I do:

if(bcrypt($request->password === Auth::user()->password)
{
//Do something
}

I want to do it correctly and Laravel style. I would be surprised if Laravel did not already have a proper function for this.



via prgrm

Advertisement