title: Auth::viaRemember() doesnot work (means always return false even after successful login) in laravel 5.4
body: <p>I make use of <code>php artisan make:auth</code> in laravel 5.4, as we know laravel default login only supports email so, I put <code>login()</code> in AuthController like below (login working)-</p>
  
  <pre><code>public function login(Request $request)
  {
      $remember = ($request-&gt;input('remember')=='1')?true:false;
      // this will remember the user as given in laravel documentation.
      if (Auth::attempt(['user_name' =&gt; $request-&gt;user_name, 'password' =&gt; $request-&gt;password],$remember)) {
          return redirect()-&gt;intended('admin');
      } 
  
      elseif (Auth::attempt(['email'=&gt; $request-&gt;user_name, 'password' =&gt; $request-&gt;password],$remember)) {
  
              return redirect()-&gt;intended('admin'); 
      } 
  
  
      else {
          return redirect('/login')-&gt;with(['error'=&gt;'Invalid user name and password'])
                                   -&gt;withInput();
  
      }
  }
  </code></pre>
  
  <p>Now, whenever session expired simply typing url should redirect to admin/dashboard, But couldnot do so... By default it redirects to login page. </p>
  
  <p>I put <code>Auth::viaRemember()</code> in constructor of AuthContoller class before checking for middleware like below-</p>
  
  <pre><code>public function __construct()
  {
      // login with  remember me before checking whether its logged in or not
      Auth::viaRemember();
      $this-&gt;middleware($this-&gt;guestMiddleware(), ['except' =&gt; 'logout']);
  }
  </code></pre>
  
  <p>What i follow in stack overflow - </p>
  
  <p><a href="https://stackoverflow.com/questions/39885982/via-remember-me-always-return-false">Via Remember me always return false</a> -this link is similar to mine</p>
  
  <p><a href="https://stackoverflow.com/questions/21269223/viaremember-not-work-laravel">viaRemember not work - laravel</a></p>
  
  <p><a href="https://stackoverflow.com/questions/39439494/laravel-5-viaremember-always-false">Laravel 5 viaRemember() always false</a></p>
  
  <p><a href="https://stackoverflow.com/questions/28406753/laravel-implement-authviaremember-across-the-website">Laravel: Implement Auth::viaRemember() across the website</a></p>