title: Put request in ajax
body: <p>I have a route like this --</p>
  
  <pre><code>Route::put('avote', 'voteController@avote')-&gt;middleware('auth');
  </code></pre>
  
  <p>I want to access this route from a ajax send request.
  <br>When i use this code -- </p>
  
  <pre><code>$data = {/* some data here */};
  $.post("/avote", $data, function(result) {
      $('#avote h2').html(result);
      $('#avote a span').css('color', 'orange');
      $('#avote a span').unwrap();
  });
  </code></pre>
  
  <p>I get an error <code>method not allowed</code>. I know that it is the problem of method I used (used post not put)</p>
  
  <p>I question is, is there any way i can get the information from <code>/avote</code> using ajax or any other scripts?</p>
  
  <p><strong>Please dont suggest me to change the route request from <code>put</code> to <code>post</code></strong> or <strong>Any other way to protect the <code>/avote</code> route</strong></p>
  
  <blockquote>
    <p>I used <code>Route::put()</code> beacuse i have a database update function in the route controller</p>
  </blockquote>