laravelshipping / common
Shared interfaces, value objects, enums, events, and base classes for the Laravel Shipping Suite
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. Provides all contracts, value objects, DTOs, enums, events, and exceptions that every carrier package builds upon.
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 |
Documentation
Full documentation at gitlab.com/laravelshipping/docs.
License
MIT — see LICENSE.