I'm pretty new to Laravel and was wondering how I can set up a function to run on an event. Specifically, when a user log outs, how can I call a function?
What would be the best way to do this, registering a new logout event or does Laravel 7 already have a file I can edit to run commands on logout?
Thanks for any help.
You can listen for the
Illuminate\Auth\Events\Logout
event.