title: Laravel csrf token mismatch for ajax POST Request
body: <p>I am trying to delete data from database via ajax.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>@foreach($a as $lis)
    //some code
    &lt;a href="#" class="delteadd" id="{{$lis['id']}}"&gt;Delete&lt;/a&gt;
    //click action perform on this link                  
  @endforeach
  </code></pre>
  
  <p><strong>My ajax code:</strong></p>
  
  <pre><code>$('body').on('click', '.delteadd', function (e) {
  e.preventDefault();
  //alert('am i here');
  if (confirm('Are you sure you want to Delete Ad ?')) {
      var id = $(this).attr('id');
      $.ajax({
          method: "POST",
          url: "{{url()}}/delteadd",
          }).done(function( msg ) {
          if(msg.error == 0){
              //$('.sucess-status-update').html(msg.message);
              alert(msg.message);
          }else{
              alert(msg.message);
              //$('.error-favourite-message').html(msg.message);
          }
      });
  } else {
      return false;
  }
  });
  </code></pre>
  
  <p>This is my query to fetch data from database...</p>
  
  <pre><code>$a = Test::with('hitsCount')-&gt;where('userid', $id)-&gt;get()-&gt;toArray();
  </code></pre>
  
  <p>But when i click on Delete link data not deleted and show csrf_token mismatch...</p>