I am working with laravel auth and resetting password using ResetsPasswords Trait with SHA512 encryption here is my code of ResetPassowrds trait
/**
* Reset the given user's password.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword $user
* @param string $password
* @return void
*/
protected function resetPassword($user, $password)
{
$user->password = hash('sha512',$password);
$user->setRememberToken(Str::random(60));
$user->save();
event(new PasswordReset($user));
$this->guard()->login($user);
}
code is working properly in local but when i switch to server the password got updated in bcrypt how to resolve this...?