How do i Log/Auditrail Logout activity by user?

I managed to Log Login by Overriding the login pages just like in the picture, but now i want to log the logout activity too, but i dont know where and which file to override ?
No description
1 Reply
toeknee
toeknee9h ago
I wouldn't overrride it, ideally you want to add a watcher tbh. In the Event Service Provider
\Illuminate\Auth\Events\Login::class => [
\App\Listeners\LoginSuccessful::class,
],
\Illuminate\Auth\Events\Login::class => [
\App\Listeners\LoginSuccessful::class,
],
On login store logged in, for logout:
\Illuminate\Auth\Events\Logout::class => [
\App\Listeners\LoggedOut::class,
],
\Illuminate\Auth\Events\Logout::class => [
\App\Listeners\LoggedOut::class,
],

Did you find this page helpful?