Is there no elegant solution to redirect to a specific page after logging out in Laravel 5.3?
The function being called is from the trait AuthenticatesUsers:
public function logout(Request $request)
{
$this->guard()->logout();
$request->session()->flush();
$request->session()->regenerate();
return redirect('/');
}
This is a default function from the core of laravel. So I have to override the whole function I cannot edit the core. But isn't there a more simpler solution, cause it feel like overkill to manually logout, flush and regenerate again.
Worked the answers out in an article: https://codeneverlied.com/how-to-set-logout-redirect-path-in-laravel-5-8-and-before/