title: Getting a 405 method not allowed exception
body: <p>I have a jquery script(downloaded from github) that deletes the entities. Following is the script. </p>
  
  <pre><code>$(document).ready(function() {
  
  
  var restful = {
  
      init: function(elem) {
          elem.on('click', function(e) {
              self=$(this);
              e.preventDefault();
  
              if(confirm('Are you sure you want to delete this record ? Note : The record will be deleted permanently from the database!')) {
                  $.ajax({
                      headers: {
                          Accept : "text/plain; charset=utf-8",
                          "Content-Type": "text/plain; charset=utf-8"
                      },
                      url: self.attr('href'),
                      method: 'DELETE',
                      success: function(data) {
                          self.closest('li').remove();
                      },
                      error: function(data) {
                          alert("Error while deleting.");
                          console.log(data);
                      }
                  });
              }
          })
      }
  };
  
  restful.init($('.rest-delete'));
  </code></pre>
  
  <p>});</p>
  
  <p>and i use it as such </p>
  
  <pre><code>{{link_to_route('download.delete','x', ['id' =&gt; $download-&gt;id], array('class'=&gt; 'rest-delete label label-danger')) }}
  </code></pre>
  
  <p>The corresponding laravel route is as follows </p>
  
  <pre><code>Route::delete('/deletedownload/{id}', array('uses' =&gt; 'DownloadsController@deletedownload', 'as'=&gt;'download.delete'));
  </code></pre>
  
  <p>However I am getting a 405 Method not allowed error when I try to press the X (delete button). The error is as follows </p>
  
  <pre><code>DELETE http://production:1234/deletedownload/42 405 (Method Not Allowed) . 
  </code></pre>
  
  <p>This is working fine on my local sandbox. </p>
  
  <p>Any help will be well appreciated. </p>
  
  <p>thanks </p>