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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -