title: Check whether password is correct or not in Laravel
body: <p>In laravel I want to check if user enter current password than check with that password which is store in database in that user data. If correct than continue otherwise give message Password is incorrect.</p>
  
  <p>I am new in laravel so not getting exact idea for this. </p>
  
  <p>Thanks in advance.</p>
  
  <pre><code>$('#pwd').blur(function(){
              var oldpwd=$('#pwd').val();
              var uid = $('#id').val();
              console.log(uid);
              if(oldpwd != "")
              {
                $.ajax({
                    url : "{{ url/profile/checkOldPwd}}",
                    data : { oldpwd:oldpwd , uid:uid },
                    type : "POST",
                    success : function(data) {
                      if(data == 0){
                        $("#msg-old").show();
                        $("#msg-old").html("Password is Incorrect!");
                        $("#pwd").val("");
                        $("#pwd").focus();
                    }
                    else
                    {
                      $("#msg-old").hide();
                      $("#msg-old").html("");
                    }
                  }
                  });
                }
              });
  </code></pre>