title: how can i check whether the entered password is current password?
body: <p>To change the password, i enter the current password.For the correct password also an error msg will be displayed </p>
  
  <p>public function passwordupdate(Request $request){</p>
  
  <pre><code>    $user=user::find(Auth::user()-&gt;id);
  
      $validator=Validator::make($request-&gt;all(), [
          //'password' =&gt; 'required|confirmed|min:6|max:14' 
          'cpassword'=&gt; 'required|confirmed|min:6|max:14'                     
      ]);
      if($validator-&gt;fails()){
          return redirect()-&gt;back()-&gt;withErrors(['cpassword'=&gt;'Please check the password you given']);
      }else{
          $user-&gt;cpassword=bcrypt($request-&gt;cpassword);
           $user-&gt;save();
          return redirect()-&gt;back();
      }
  
  }
  </code></pre>