We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aba50df + 27db557 commit 44bbf2cCopy full SHA for 44bbf2c
src/Controllers/LoginController.php
@@ -101,8 +101,12 @@ protected function getValidationRules(): array
101
*/
102
public function logoutAction(): RedirectResponse
103
{
104
+ // Capture logout redirect URL before auth logout,
105
+ // otherwise you cannot check the user in `logoutRedirect()`.
106
+ $url = config('Auth')->logoutRedirect();
107
+
108
auth()->logout();
109
- return redirect()->to(config('Auth')->logoutRedirect())->with('message', lang('Auth.successLogout'));
110
+ return redirect()->to($url)->with('message', lang('Auth.successLogout'));
111
}
112
0 commit comments