We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
My project is based on cache and session, i need clear on impersonate logout.
Exemple of logout in my project:
public function logout(Request $request) { session()->flush(); Cache::pull('user-id-' . Session()->get('user.id')); Auth::logout(); return redirect(route('home')); }
It's possible?
The text was updated successfully, but these errors were encountered:
session()->flush() it will clear everything.
session()->flush()
you can also listen for LeaveImpersonation::class or TakeImpersonation::class and take actions.
LeaveImpersonation::class
TakeImpersonation::class
use Lab404\Impersonate\Events\LeaveImpersonation; Event::listen(LeaveImpersonation::class, function ($impersonator, $impersonated) { // });
use Lab404\Impersonate\Events\TakeImpersonation; Event::listen(TakeImpersonation::class, function ($impersonator, $impersonated) { // });
Sorry, something went wrong.
session()->flush() it will clear everything. you can also listen for LeaveImpersonation::class or TakeImpersonation::class and take actions. use Lab404\Impersonate\Events\LeaveImpersonation; Event::listen(LeaveImpersonation::class, function ($impersonator, $impersonated) { // }); use Lab404\Impersonate\Events\TakeImpersonation; Event::listen(TakeImpersonation::class, function ($impersonator, $impersonated) { // });
Thanks for help @KABBOUCHI Kabbouchi, i need listen in EventServiceProvider (boot) ?
yes in the EventServiceProvider, https://laravel.com/docs/5.7/events#manually-registering-events
No branches or pull requests
Hello,
My project is based on cache and session, i need clear on impersonate logout.
Exemple of logout in my project:
It's possible?
The text was updated successfully, but these errors were encountered: