title: Laravel 5 logout or session destroy
body: <p>I am having issues logging out of a laravel 5.1 app - I believe the issue is that the session is not destroyed. </p>
  
  <p>My question is nearly identical to:</p>
  
  <p><a href="https://stackoverflow.com/questions/29621965/laravel-5-auth-logout-not-destroying-session">Laravel 5 Auth Logout not destroying session</a></p>
  
  <p>with the caveat that my solution is to use</p>
  
  <pre><code>session_unset();
  </code></pre>
  
  <p>rather than</p>
  
  <pre><code>Session::flush();
  </code></pre>
  
  <p>so my working solution to logging out of a laravel 5.1 app is:</p>
  
  <pre><code>public function getLogout()
  {
      \Auth::logout();
      session_unset();
      return redirect(property_exists($this, 'redirectAfterLogout') ? $this-&gt;redirectAfterLogout : '/');
  
      //these attempts will not remove values from the session.....
  
      //session()-&gt;forget('db');
      //\Session::flush();
  
  
  }
  </code></pre>
  
  <p>any ideas why <code>\Session::flush();</code> and <code>session()-&gt;forget('db');</code> are not working? </p>