PKGE Driver
This is a driver for the PKGE API. Check out the repository on GitHub for more information.
Installation
First, install the PKGE driver via the Composer package manager:
shell
composer require parceltrap/driver-pkgecomposer require parceltrap/driver-pkgeConfiguration
In your config/parceltrap.php configuration file, add the following to the drivers key:
php
'pkge' => [
'api_key' => env('PARCELTRAP_PKGE_API_KEY'),
],'pkge' => [
'api_key' => env('PARCELTRAP_PKGE_API_KEY'),
],You can get these details by registering for the PKGE API. To find out more, visit the Package Tracking API reference. This documentation page also shows the raw PKGE-specific data that can be found in the returned TrackingDetails DTO.
Usage
php
$driver = \ParcelTrap\Facades\ParcelTrap::driver('pkge');
$driver->find('UA937578848US'); // ParcelTrap\DTOs\TrackingDetails$driver = \ParcelTrap\Facades\ParcelTrap::driver('pkge');
$driver->find('UA937578848US'); // ParcelTrap\DTOs\TrackingDetails