Laravel hash periksa kata sandi, memverifikasi bahwa kata sandi cocok dengan hash
if (Hash::check('plain-text', $hashedPassword)) {
// The passwords match...
}
kelraf
if (Hash::check('plain-text', $hashedPassword)) {
// The passwords match...
}
$password = Hash::make('yourPa$$w0rd');
$data = User::find($id);
if( ! Hash::check( $data->password , Input::get('currPassword') ) )
{
return Redirect::to('/admin/profile')
->with('message', 'Current Password Error !')
->withInput();
}
$password = Input::get('passwordformfield'); // password is form field
$hashed = Hash::make($password);
$data = User::find($id);
if( ! Hash::check( Input::get('currPassword') , $data->password ) )
{
return Redirect::to('/admin/profile')
->with('message', 'Current Password Error !')
->withInput();
}