libaro / shipmenttracker
Shipment Tracker
1.0.0
2022-07-15 14:56 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- orchestra/testbench: ^v7.5.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- roave/security-advisories: dev-latest
- dev-main
- 1.0.0
- 0.0.1
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-5
- dev-dependabot/github_actions/actions/checkout-4
- dev-dependabot/github_actions/ramsey/composer-install-2
- dev-feature/rework-general-code-setup
- dev-dhl-barcode-tag-update
- dev-feature/track-multiple-packages
- dev-feature/add-dhl-adapter
This package is auto-updated.
Last update: 2024-11-09 02:23:31 UTC
README
Package Description
A package to easily track the status of you parcel. With support for multiple providers (BPost, PostNL and DHL). A provider can be added by creating an adapter for the new provider.
Installation
You can install the package via composer:
composer require libaro/shipmenttracker
You can publish the config file with:
php artisan vendor:publish --tag="shipment-tracker"
This is the contents of the published config file:
return [ 'providers' => [ [ 'name' => 'bpost', 'label' => 'BPost', 'adapter' => \Libaro\ShipmentTracker\Adapters\BPostAdapter::class, 'barcode_tags' => [3232], 'credentials' => [ 'username' => env('SHIPMENT_TRACKER_BPOST_USERNAME'), 'password' => env('SHIPMENT_TRACKER_BPOST_PASSWORD'), ], ], [ 'name' => 'post_nl', 'label' => 'PostNL', 'adapter' => \Libaro\ShipmentTracker\Adapters\PostNLAdapter::class, 'barcode_tags' => ['3S', 'CD'], 'credentials' => [ ], ], [ 'name' => 'dhl', 'label' => 'DHL', 'adapter' => \Libaro\ShipmentTracker\Adapters\DhlAdapter::class, 'barcode_tags' => [], 'credentials' => [ 'api_key' => env('SHIPMENT_TRACKER_DHL_API_KEY'), 'api_secret' => env('SHIPMENT_TRACKER_DHL_API_SECRET') ], ], ], ];
Usage
You can use the Shipment
facade to track your parcel.
Shipment::track('5995390550944994')
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.