title: Laravel: Implement Auth::viaRemember() across the website
body: <p><strong>Issue summary</strong></p>
  
  <p>I would like to know how to properly implement user auth with Laravel's <code>Auth::viaRemember()</code> so it's checked across my website (through the remember cookie).</p>
  
  <p>The token is set like this on login:</p>
  
  <pre><code>if (Auth::attempt(['email' =&gt; $email, 'password' =&gt; $password], $remember)) {
      // The user is being remembered...
  }
  </code></pre>
  
  <p>which sets the <strong>remember_xxxxxxxxxxx</strong> cookie in the browser.</p>
  
  <p><strong>Session config</strong></p>
  
  <p>My session is configured to last 120 min after the browser was closed:</p>
  
  <pre><code>'lifetime' =&gt; 120,
  'expire_on_close' =&gt; false,
  </code></pre>
  
  <p><strong>Checking the remember cookie</strong></p>
  
  <p>When the session expires after 120 min and the user comes to the page again, they should be authenticated via the remember token, maybe redirected to specific auth-filtered page. <strong>How is the check actually done?</strong></p>
  
  <ol>
  <li>Do I do it manually, e.g. by extending BaseController or applying a filter to all the routes?</li>
  </ol>
  
  <p><strong>or</strong> </p>
  
  <ol start="2">
  <li>Does Laravel deal with the cookie auth in the background?</li>
  </ol>