title: Laravel AJAX POST request is empty
body: <p>When I pass POST data through AJAX to my controller it is empty.
  In the AJAX the data is still there but after I send it the controller it says it is empty.</p>
  
  <p>AJAX:</p>
  
  <pre><code>  function usernameCheck()
  {
      var input = document.getElementById("usernameInput");
      var icon = document.getElementById("userIcon");
      var xmlhttp,
          username = document.getElementById("usernameInput"),
          message = document.getElementById("usernameMessage");
  
      if (username.value != "") {
          if (window.XMLHttpRequest) {
             // code for IE7+, Firefox, Chrome, Opera, Safari
             xmlhttp=new XMLHttpRequest();
          } else {
              // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
          xmlhttp.onreadystatechange = function() {
              if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) {
  
                  // FOR DEBUGGING
                  console.log(xmlhttp.responseText);
  
              }
          }
      }
  
      xmlhttp.open("POST", "usernamevalidation", true);
      xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlhttp.send("username=" + username.value);
      }
    }
  </code></pre>
  
  <p>Routes.php:</p>
  
  <pre><code>Route::post('usernamevalidation', 'UserController@validateUsername');
  </code></pre>
  
  <p>UserController.php:</p>
  
  <pre><code>class UserController extends BaseController {
  
      public function validateUsername() {
  
         // FOR DEBUGGING
         dd(Input::all());
  
      }
  }
  </code></pre>
  
  <p>The code that I console.logged (which is empty and should contain the username):</p>
  
  <pre><code>&lt;pre class='xdebug-var-dump' dir='ltr'&gt;
  &lt;b&gt;array&lt;/b&gt; &lt;i&gt;(size=0)&lt;/i&gt;
    &lt;i&gt;&lt;font color='#888a85'&gt;empty&lt;/font&gt;&lt;/i&gt;
  &lt;/pre&gt;
  </code></pre>