Listen to impersonation events
masterThe package dispatches two events that you can listen to:
TakeImpersonation: Fired when an impersonation session begins.LeaveImpersonation: Fired when an impersonation session ends.
Both events provide access to the following properties:
$event->impersonator: The User model instance of the original user.$event->impersonated: The User model instance of the user being impersonated.