Created
January 29, 2020 16:12
-
-
Save TardencillaRuiz/486c977d9373833bd22b07b2c63deda6 to your computer and use it in GitHub Desktop.
Prevent browser's back button login after logout in Laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function logout(Request $request) | |
{ | |
$this->guard()->logout(); | |
$request->session()->invalidate(); | |
$request->session()->regenerateToken(); | |
return $this->loggedOut($request) ?: redirect()->back(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment