smart-dato / brt-tracking
Laravel package for interfacing with the BRT VAS100 tracking SOAP webservices.
Fund package maintenance!
SmartDato
Requires
- php: ^8.3
- ext-soap: *
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-data: ^4.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^2.0||^3.0
- pestphp/pest-plugin-arch: ^2.5||^3.0
- pestphp/pest-plugin-laravel: ^2.0||^3.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2025-08-12 14:17:58 UTC
README
This package provides a Laravel-friendly wrapper around the BRT VAS100 tracking SOAP services. It allows you to resolve shipment identifiers based on your own references, fetch full shipment details, and retrieve legends for statuses and events. It also includes utilities for caching and patching the WSDL files to ensure that PHP's SOAP client uses secure HTTPS endpoints.
Installation
You can install the package via composer:
composer require smart-dato/brt-tracking
You can publish the config file with:
php artisan vendor:publish --tag="brt-tracking-config"
This is the contents of the published config file:
return [
];
Optionally you may cache the WSDL files to fix the http/https mismatch:
php artisan brt:cache-wsdl
Usage
You can resolve the BrtTrackingClient
from the service container or use the facade
provided by this package. All methods return simple arrays or data objects for easy
consumption.
use SmartDato\BrtTracking\Facades\BrtTracking; // Look up a shipment id by your numeric reference $shipmentId = BrtTracking::getShipmentIdByRMN(123456789); // Fetch detailed shipment information $shipment = BrtTracking::trackingByShipmentId($shipmentId); // Retrieve legends for statuses and events $esiti = BrtTracking::getLegendaEsiti(); $eventi = BrtTracking::getLegendaEventi();
See the published configuration file for all available options.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.