title: Laravel api routes doesn't works - 404
body: <p>I try to use API routing but my routes don't work.</p>
  <p>When I try to login with http://xxxxxxx/api/v1/auth/login</p>
  <p>The server sends me a 404 error. Do you have an idea?</p>
  <pre><code>// Auth Endpoints
  Route::group([
  'middleware' =&gt; 'cors',
  'prefix' =&gt; 'v1/auth'
  ], function ($router) {
  Route::post('login', 'Auth\LoginController@login');
  Route::post('logout', 'Auth\LogoutController@logout');
  Route::post('register', 'Auth\RegisterController@register');
  Route::post('forgot-password', 'Auth\ForgotPasswordController@email');
  Route::post('password-reset', 'Auth\ResetPasswordController@reset');
  });
  
  // Resource Endpoints
  Route::group([
  'middleware' =&gt; 'cors',
  'prefix' =&gt; 'v1'
  ], function ($router) {
  Route::apiResource('todo', 'TodoController');
  });
  </code></pre>
  <blockquote>
  <p>// Not Found Route::fallback(function(){
  return response()-&gt;json(['message' =&gt; 'Resource not found.'], 404); });```</p>
  </blockquote>