title: Laravel 5.4 Set All Authentication Routes Except Logout Route - Using Custom Logout Route/Controller
body: <p>So for some reason I thought I came across the answer to this question before, but for the life of me I can't find the answer again, either through Google or StackOverflow. This might just be a rubber duck question and I'm sorry if it is, but I hope this question will be of some use to someone someday with this same issue.</p>
  
  <p>Let's assume we're starting with a fresh installation of Laravel 5.4. I run the <code>php artisan make:auth</code> command in my terminal and it sets up the Authentication Scaffolding for me. Now in my /routes/web.php file I see the following line:</p>
  
  <p><code>Auth::routes();</code></p>
  
  <p>Which is awesome and the route list has all the Authentication routes listed including the logout route defined. (Typed <code>php artisan r:l</code> to double check) Now I want to set a custom logout route for the user using the a custom Logout Controller. Now, I thought that there was a method you could chain onto a group of resource routes called 'except()' but for the life of me I can't find any information in the documentation about this method. I don't know if this method even exists let alone know what to pass it.</p>
  
  <p>I'm assuming that the <code>Auth::routes()</code> generation can use the except method like in a resource route, but I'm not entirely sure how to implement it?</p>
  
  <p>So the question is simple. How do I include all authentication routes except the logout route, and then i'll define the logout route using the following line.</p>
  
  <p><code>Route::get('logout', 'LogoutController@userLogout')-&gt;name('logout');</code></p>
  
  <p>Sorry if this is a duplicate entry, I've used the search bar for the past hour and nothing is answering my question.</p>
  
  <p>Edit: I did more research into Resource Routes and realized that it's not a method that I chain onto the route, but rather an array with a key value pair. See code below (Ripped from laravel docs).</p>
  
  <pre><code>Route::resource('photo', 'PhotoController', ['except' =&gt; [
      'create', 'store', 'update', 'destroy'
  ]]);
  </code></pre>
  
  <p>However when I pass the array into the <code>routes()</code> method (see code below) the logout route is still there in the route list. However no error is being thrown upon the <code>php artisan r:l</code> command.</p>
  
  <pre><code>// User Authentication Routes
  Auth::routes(['except' =&gt; 'logout']);
  </code></pre>
  
  <p>EDIT: After much digging around it seems like it is not possible to do this type of functionality. I have submitted an issue to the laravel/framework github repo requesting the feature be added in 5.5.</p>
  
  <p><a href="https://stackoverflow.com/questions/35132245/exclude-route-from-laravel-authentication">Exclude route from Laravel authentication</a></p>
  
  <p><a href="https://github.com/laravel/framework/issues/20904" rel="nofollow noreferrer">https://github.com/laravel/framework/issues/20904</a></p>