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.
1 parent 3fede09 commit 924c89cCopy full SHA for 924c89c
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 'Call to a member function inGroup() on null' is thrown
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