title: How to fix "POST http://localhost:8000/users/create 405 (Method Not Allowed)"
body: <p>I'm setting on my "HTML", and I want to send data with JavaScript, but still receive the following error.</p>
  
  <blockquote>
    <p>405 (Method Not Allowed)</p>
  </blockquote>
  
  <p><strong>JavaScript</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>function cb(){
  
      $.ajax({
          type:"POST",
          url:'http://localhost:8000/users/create',
          data:selchbox,
      });
  
      var selchbox = [];
      var sb = [];
      var input = document.getElementsByTagName('input');
      for(var i=0; i&lt;input.length;i++){
          if (input[i].type == 'checkbox' &amp;&amp; input[i].checked == true) 
              selchbox.push(input[i].value);
      }
      console.log(selchbox);
  }
  </code></pre>
  
  <p><strong>Route</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>Route::post('/create', 'usersController@create');
  </code></pre>