title: Middleware not working correctly after hitting browser 'go back' button for the first time Laravel
body: <p>I have a login page and when the user enters their login and password correctly, I redirect them to a dashboard page. I am using Laravel <code>guest</code> middleware, so when a logged in user tries to go to login page, they get redirected to dashboard. Everything works fine, except when the user logs in and gets redirected to dashboard, if they hit the browser back button, the login page still shows. It only goes away after a refresh. How can I fix this problem?</p>
  
  <p>Here's my routes:</p>
  
  <pre><code>Route::group( ['middleware' =&gt; 'guest' ],function() 
  {
  
      Route::get('/', 'MainController@index');
  
      Route::get('/loadLogin','MainController@loadLogin');
  
  });
  </code></pre>