php - Laravel Update password validation -
i have got edit form user enter new password , want check if password entered matches password exist in database if matches error "new password cannot same old password"
this code tried , not working me !! :(
if(\hash::check($request->password,$old_password)){ return redirect::back()->witherrors(['message', 'new password cannot same old password']); }
if (hash::check("valueforenteredpassword", "hasholdpassword")) { //your code } else { //your error message }
Comments
Post a Comment