Better audit logs

This commit is contained in:
James Cole
2020-08-13 13:18:54 +02:00
parent ee3ef4b8cc
commit 76cd77cc73
5 changed files with 23 additions and 14 deletions

View File

@@ -38,13 +38,11 @@ class AuditProcessor
public function __invoke(array $record): array
{
$record['extra']['path'] = request()->method() . ':' . request()->url();
$record['extra']['IP'] = app('request')->ip();
if (auth()->check()) {
$record['extra']['user'] = auth()->user()->email;
}
return $record;
}
}