mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-24 19:33:07 +01:00
35 lines
616 B
PHP
35 lines
616 B
PHP
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use Illuminate\Auth\Events\Logout;
|
|
|
|
class LogSuccessfulLogout
|
|
{
|
|
/**
|
|
* Create the event listener.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the event.
|
|
*
|
|
* @param Logout $event
|
|
*
|
|
* @return void
|
|
*/
|
|
public function handle(Logout $event)
|
|
{
|
|
activity()
|
|
->causedBy($event->user)
|
|
->withProperties(['ip' => app('request')->ip()])
|
|
->useLog(\App\ActivityLog::NAME_USER)
|
|
->log(\App\ActivityLog::DESCRIPTION_USER_LOGOUT);
|
|
}
|
|
}
|