title: 405 Method Not Allowed for POST and PUT in laravel application
body: <p>I'm trying to drop and resize an event in fullcalendar in laravel, but when I move the event, I have 405 Method Not Allowed error message!..</p>
  
  <p><strong>My web.php file:</strong>    </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Route::get('calendar', 'FullCalendarController@index');
  Route::get('/load-events', 'EventController@loadEvents')-&gt;name('routeLoadEvents');
  Route::put('/events-update', 'EventController@update')-&gt;name('routeEventUpdate');</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>My blade.php file:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id='calendar' 
  data-route-load-events="{{route('routeLoadEvents')}}" 
  data-route-events-update="{{route('routeEventUpdate')}}"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>My .js file:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function (){
      $.ajaxSetup({
         headers: {
          'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
         }
      });
  });
  
  function sendEvent(route, data_){
      $.ajax({
          url: route,
          data: data_,
          method: 'POST',
          dataType: 'json',
          success: function(json){
              if(json){
                  location.reload();
              }
          }
      });
  }
  
  function routeEvents(route){
      return document.getElementById('calendar').dataset[route];
  }
  
  eventDrop: function(element){
  
          let start = moment( element.event.start ).format("YYYY-MM-DD HH:mm:ss");
          let end = moment( element.event.end ).format("YYYY-MM-DD HH:mm:ss");
  
          let newEvent = {
              _method: 'PUT',
              id: element.event.id,
              start: start,
              end: end
          };
  
          sendEvent(routeEvents('routeEventUpdate'), newEvent);
  
        },</code></pre>
  </div>
  </div>
  </p>