This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function boot(): void | |
{ | |
// Build out the impersonation event listeners - Otherwise we get a redirect to login if not setting the password_hash_sanctum when using sanctum. | |
Event::listen(function (TakeImpersonation $event) { | |
session()->put([ | |
'password_hash_sanctum' => $event->impersonated->getAuthPassword(), | |
]); | |
}); | |
Event::listen(function (LeaveImpersonation $event) { |