Skip to content

Get Server Information

Get general about your Traccar server instance into your laravel application.

Request

Use the ThingsTelemetry\Traccar\Facades\Server::getInformation() method to get information about your Traccar server instance.

php

$info = \ThingsTelemetry\Traccar\Facades\Server::getInformation();

Results

The response is an instance of ThingsTelemetry\Traccar\Dto\ServerData DTO class

php
$version = $info->version; // 6.10
$mapProvider = $info->map->label(); // Google Satellite
$speedUnit = $info->attributes->speedUnit->value; // kmh
$speedUnit = $info->attributes->speedUnit->label(); // Kilometers per Hour (km/h)
$timezone = $info->attributes->timezone; // UTC

Key Results Items

While most fields are cast into a string or ints, some are cast into a DTO/Service class.

IMPORTANT

Refer to the ServerData DTO documentation for more details on the DTO structure.

Released under the MIT License.