goedgepickt/dhlparcel-php-api
PHP client for the DHL Parcel API, simplifying shipment creation, label generation, rate requests, and parcel tracking in Laravel or plain PHP apps. A clean wrapper around DHL Parcel endpoints that keeps integration code readable and maintainable.
composer require (check the README for the exact vendor/package name and the Laravel version constraint), then publish the config: php artisan vendor:publish --tag=<package>-config. Put credentials in config/services.php and .env — never commit them.README.md → the published config file (it documents every knob) → the CHANGELOG entry for v1.5.21, which is where the new customs declaration support is described. The changelog is the fastest way to see whether the declaration is a new builder method, a new model/DTO, or an option on an existing shipment call.app(<Package>::class)) resolves and that a trivial call returns a response. If the package ships a facade, prefer the injected class in your own services and reserve the facade for tinker/one-off scripts.ShippingService / CustomsService in your app. This keeps the vendor class out of controllers and makes it a one-file change if declaration APIs shift again.description, quantity, unitValue, weight, hsCode, countryOfOrigin. Build a toDeclarationItem() method on the line-item model so the mapping lives next to the data instead of in the job.shipments table). Reprinting customs paperwork and reconciliations both depend on this; providers often won't let you re-fetch documents later.FormRequest for HS codes (6–10 digits depending on destination), ISO-2 country codes, positive weights, and a currency matching the order invoice. Catching these in validation is far cheaper than a provider-side rejection after a queue round-trip.Http::fake() (or the package's own fake, if it ships one) with a recorded declaration response; assert your service builds the right payload rather than asserting on the vendor's internal objects..env on a worker is a classic), and log which environment a declaration was created against so you can distinguish test records.composer.json with a tilde (~1.5.0) until you've run one full international order through it.How can I help you explore Laravel packages today?