title: How to set laravel 5.3 logout redirect path?
body: <p>Is there no elegant solution to redirect to a specific page after logging out in Laravel 5.3? </p>
  
  <p>The function being called is from the trait <strong>AuthenticatesUsers</strong>: </p>
  
  <pre><code>public function logout(Request $request)
  {
      $this-&gt;guard()-&gt;logout();
  
      $request-&gt;session()-&gt;flush();
  
      $request-&gt;session()-&gt;regenerate();
  
      return redirect('/');
  }
  </code></pre>
  
  <p>This is a default function from the core of laravel. So I have to override the whole function I cannot edit the core.
  But isn't there a more simpler solution, cause it feel like overkill to manually logout, flush and regenerate again.</p>
  
  <p>Worked the answers out in an article:
  <a href="https://codeneverlied.com/how-to-set-logout-redirect-path-in-laravel-5-8-and-before/" rel="noreferrer">https://codeneverlied.com/how-to-set-logout-redirect-path-in-laravel-5-8-and-before/</a></p>