title: Laravel API Routing Middleware
body: <p>I am running Laravel 5.4 and have my API routes setup with an API middleware that verifies an authentication token sent in the headers.</p>
  
  <p>However, I want to avoid, or prevent the api/Login (route that generates the auth token) from being subject to the middleware.</p>
  
  <p>Currently, in my API middleware, before any logic happens I have:</p>
  
  <pre><code>if(strpos($request-&gt;getUri(), 'Login')):
      return $next($request);
  endif;
  </code></pre>
  
  <p>I would like to remove checking if the route is the Login route before proceeding with the middleware logic. Is there a native way in Laravel to accomplish the above?</p>
  
  <p>Note: all API routes are protected via an API middleware group which I have created in the Http/Kernel, then added the in the RouteServiceProvider.</p>