How I can customize logout process ?

I want do something after logout user. How I can make this possible
Solution:
There's a Logout event you can listen to.
Jump to solution
4 Replies
Saidazam
SaidazamOP8mo ago
:fi:
Solution
Dennis Koch
Dennis Koch8mo ago
There's a Logout event you can listen to.
Ramon.vV
Ramon.vV8mo ago
I'm doing something like this:
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app->bind(LogoutResponseContract::class, LogoutResponse::class);
}
}


class LogoutResponse implements Responsable
{
public function toResponse($request): RedirectResponse
{
// change this to your desired route
return redirect('/');
}
}
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app->bind(LogoutResponseContract::class, LogoutResponse::class);
}
}


class LogoutResponse implements Responsable
{
public function toResponse($request): RedirectResponse
{
// change this to your desired route
return redirect('/');
}
}
Saidazam
SaidazamOP8mo ago
thanks
Want results from more Discord servers?
Add your server