title: API route gives 404 error: Laravel 5.3
body: <p>I was testing my api on godaddy server. But due to some reasons the route is not working and giving 404 error</p>
  
  <p>In order to make sure that the route exists...I tested it like using below code.</p>
  
  <pre><code>$routeCollection = \Route::getRoutes();
  
  foreach ($routeCollection as $value) {
      echo $value-&gt;getPath();
  }
  </code></pre>
  
  <p>and you can check the same here as well: <a href="http://pankajservers.in/" rel="nofollow noreferrer">http://pankajservers.in/</a> when u type any thing in user name or password and when u see console...it will show u 404 api error and on local it works perfectly.</p>
  
  <p><strong>JQuery</strong></p>
  
  <pre><code>var data = {
      "EmailAddress": $("input[name='EmailAddress']").val(), 
      "Password":     $("input[name='Password']").val(),
      "_token":       "{{ csrf_token() }}"
  };
  $.ajax({
      method: "POST",
      url:    "{!! route('AuthenticateUser') !!}",
      cache:  false,
      async:  true,
      data:   data,
      success: function(result) {
          return false;
      },
      error: function(result) {
          return false;
      }
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form method="POST" action="http://pankajservers.in/api/v1/AuthenticateUser" 
      accept-charset="UTF-8" 
      id="loginForm"&gt;
  
      &lt;input name="_token" type="hidden" value="GtSNw3bgzFO6jwi8IVFWnvymd2e8EqIXkAhPtPxb"&gt;
  
      &lt;input class="form-control" name="EmailAddress" type="text"&gt;
  
      &lt;input class="form-control" name="Password" type="password" value=""&gt;
  
      &lt;button type="submit" class="btn btn-primary"&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>POST Route</strong></p>
  
  <pre><code>Route::post('/AuthenticateUser', 
      array(
          'uses' =&gt;  'API\UserManagement\Auth\Login\apiLoginController@AuthenticateUser', 
          'as'   =&gt;  'AuthenticateUser'
      )
  );
  </code></pre>
  
  <p><strong>Route Service Provider</strong></p>
  
  <pre><code>Route::group([
      'middleware' =&gt; 'api',
      'namespace' =&gt; $this-&gt;namespace,
      'prefix' =&gt; 'api/v1',
  ], function ($router) {
      require base_path('routes/API/UserManagement/Auth/Login/Login.php');
  });
  </code></pre>