Group Share Data Dto Reference
The ThingsTelemetry\Traccar\Dto\GroupShareData represents the result of sharing a group of devices. It includes the generated token, the expiration time, the group ID, and a computed share URL that can be opened in the Traccar web UI.
php
use Carbon\CarbonImmutable;
use ThingsTelemetry\Traccar\Facades\Share;
$share = Share::group(groupId: 2, expiration: CarbonImmutable::now()->addHours(12));Properties
| Property | Type | Description |
|---|---|---|
groupId | int | Identifier of the shared group. |
token | string | Share token string returned by the server. |
expiration | CarbonImmutable | Token expiration time as a Carbon instance. |
url | string | Computed share URL for the Traccar UI. |
groupId → integer
Identifier of the shared group.
php
$share->groupId; // 2token → string
Share token string returned by the server.
php
$share->token; // "eyJhbGciOi..."expiration → CarbonImmutable
Token expiration time as a Carbon instance.
php
$share->expiration->toIso8601String(); // "2030-12-31T23:59:59+00:00"url → string
Computed share URL for the Traccar UI (base URL derived from config and token appended as query string).
php
$share->url; // "https://demo.traccar.org/?token=eyJhbGciOi..."