title: Laravel 5.4 not accepting post request in routes
body: <p>I have made a ajax call in laravel 5.4 following is the script</p>
  
  <pre><code>&lt;script&gt;
          $(document).ready(function()
              {
                  $("#btnLogin").click(function()
                      {
                          // var username = $('#username').val();
                          // var password = $('#password').val();
  
                          // var form = new FormData($('.login-form')[0]);
                          var form = $('.login-form').serializeArray();
  
                          $.ajax({
                                      url: '/login',
                                      type: 'POST',
                                      dataType: 'JSON',
                                      data: {form},
                                  })
                          .done(function(resp){
                              console.log(resp);
                          })
                          .fail(function(resp){
                              console.log(resp);
                          })
                          .always(function(resp){
                              console.log(resp);
                          });
                      });
              });
      &lt;/script&gt;
  </code></pre>
  
  <p>This is my web.php in routes folder</p>
  
  <pre><code>&lt;?php
    Route::match(['get', 'post'], '/login', function () {
    return "hello";
    });
  </code></pre>
  
  <p>It is showing the error in console log, i dont know why it is showing this. Firstly it was showing 404 not found then i realized that i had not defined in rotes then i defined in routes then it is showing this error.</p>
  
  <pre><code>POST http://www.example.com/login 500 (Internal Server Error)
  </code></pre>
  
  <p>If  access this url through browser direct it is showing <code>hello</code> but if i am making through ajax it is not loading.</p>