title: Laravel error 405(Method Not Allowed) Ajax Posting
body: <p>Hello i wnat to send my data with ajax to my controller.</p>
  
  <p>My <strong>CODE</strong></p>
  
  <p><strong>AJAX</strong></p>
  
  <pre><code>  $.ajax( {
      type:'POST',
      header:{
        'X-CSRF-TOKEN':$('meta[name="csrf-token"]').attr('content')
      },
      url:"{{route('race.post')}}",
      data:{
        _token: "{{ csrf_token() }}",
        dataType: 'json', 
        contentType:'application/json', 
      }
  
  
  })
  .done(function() {
      alert('success');
  })
  .fail(function() {
      alert("error");
  });
  </code></pre>
  
  <p><strong>CONTROLLER</strong></p>
  
  <pre><code> public function Points(Request $request){
      $test = $request-&gt;input('data');
      return "$test";
  }
  </code></pre>
  
  <p><strong>ROUTE</strong></p>
  
  <pre><code>Route::post('updateC', ['uses' =&gt;'RacesController@Points', 'as' =&gt; 'race.post']); 
  </code></pre>
  
  <p><strong>And there are the errors what i get.</strong></p>
  
  <p><a href="https://imgur.com/a/0b5DZjw" rel="nofollow noreferrer">Console</a>   </p>
  
  <p><a href="https://imgur.com/a/hbnRV5F" rel="nofollow noreferrer">Network-preview</a></p>
  
  <p><a href="https://imgur.com/a/aieOZ93" rel="nofollow noreferrer">Network-Response</a></p>