laravelshipping / common
Shared Laravel shipping API contracts, DTOs, value objects, events, and base classes for UPS, FedEx, USPS, DHL, labels, rates, tracking, and address validation
v1.0.0
2026-05-02 00:43 UTC
Requires
- php: ^8.2
- illuminate/cache: ^10.0|^11.0|^12.0
- illuminate/http: ^10.0|^11.0|^12.0
- illuminate/routing: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
- larastan/larastan: ^2.0|^3.0
- laravel/pint: ^1.0
- mockery/mockery: ^1.6
- orchestra/testbench: ^8.0|^9.0|^10.0
- pestphp/pest: ^2.0|^3.0
- pestphp/pest-plugin-laravel: ^2.0|^3.0
README
The shared foundation package of the Laravel Shipping Suite. It provides the Laravel shipping API contracts, value objects, DTOs, enums, events, and exceptions used by UPS, FedEx, USPS, DHL, rate shopping, address validation, tracking, and shipping label packages.
Use this package when you want a consistent Laravel interface for carrier integrations, shipping rates, shipment requests, label generation, tracking events, return labels, and address validation results.
Installation
composer require laravelshipping/common
Publish Configuration
php artisan vendor:publish --tag=laravelshipping-common-config
What's Included
| Component | Description |
|---|---|
CarrierInterface | The single contract all carriers implement |
| Value Objects | ShipFrom, ShipTo, Package, Dimensions, Money, Address |
| DTOs | RateRequest, ShipmentRequest, ShipmentResult, AddressValidationResult |
| Collections | RateCollection, TrackingEventCollection |
| Enums | ServiceType, ReturnType, SignatureOption, LabelFormat |
| Events | RatesRetrieved, ShipmentCreated, ReturnShipmentCreated, ShipmentVoided, TrackingStatusUpdated, RateShopCompleted |
| Exceptions | CarrierException, UnsupportedReturnTypeException |
| Hook Contracts | BeforeQuoteHook, AfterQuoteHook |
| HTTP Controllers | Single-carrier rate/shipment endpoints |
Related Packages
laravelshipping/ups— free MIT-licensed UPS REST API integration for Laravel.- FedEx, USPS, DHL, Rate Shopper, and BoxPacker commercial packages are available from laravelshipping.com.
Documentation
Full documentation at gitlab.com/laravelshipping/docs.
License
MIT — see LICENSE.