Skip to content

Audit Data DTO Reference

The ThingsTelemetry\Traccar\Dto\AuditData represents a Traccar audit log entry. Audit logs describe actions performed by users (e.g., login, device update, etc.).

php
use ThingsTelemetry\Traccar\Facades\Audit;

$auditLogs = Audit::get(); // Collection<int, AuditData>

Properties

PropertyTypeDescription
idintUnique audit record identifier.
userIdintIdentifier of the user who performed the action.
userEmailstring?Email of the user who performed the action.
typestringType of the action performed.
actionTimeCarbonImmutable?Time the action occurred.
attributesarrayAction-specific attributes payload.

idinteger

Unique audit record identifier in Traccar.

php
$log->id; // 1

userIdinteger

Identifier of the user who performed the action.

php
$log->userId; // 10

userEmailstring|null

Email of the user who performed the action.

php
$log->userEmail; // "admin@example.com"

typestring

Type of the action performed (e.g., "login", "deviceUpdate").

php
$log->type; // "login"

actionTimeCarbonImmutable|null

Time the action occurred, parsed from ISO 8601.

php
$log->actionTime->toIso8601String(); // "2025-01-01T12:00:00Z"

attributesarray<string, mixed>

Action-specific attributes payload returned by Traccar.

php
$log->attributes; // [ 'deviceId' => 5, ... ]

Released under the MIT License.