koderia-creative-lab / laravel-sendbox
A modern Laravel client for the Sendbox shipping and logistics API.
Package info
github.com/Koderia-Creative-Lab/laravel-sendbox
pkg:composer/koderia-creative-lab/laravel-sendbox
v1.0.0
2026-11-30 08:17 UTC
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/http: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- mockery/mockery: ^1.4
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A Laravel client for the Sendbox shipping and logistics API supporting delivery quotes, shipment creation, tracking, and shipment billing.
Installation
composer require koderia-creative-lab/laravel-sendbox
Publish configuration:
php artisan vendor:publish --tag="sendbox-config"
Configuration
Add the following environment variables to .env:
SENDBOX_API_TOKEN=your_api_token SENDBOX_API_SECRET=your_api_secret SENDBOX_URL=https://live.sendbox.co/v1 SENDBOX_TIMEOUT=30 SENDBOX_LOGGING=true
Usage
Get a Shipping Quote
use Koderia\Sendbox\Facades\Sendbox; $response = Sendbox::getShippingQuote([ 'origin_city' => 'Lagos', 'origin_state' => 'Lagos', 'origin_country' => 'NG', 'destination_city' => 'Abuja', 'destination_state' => 'FCT', 'destination_country' => 'NG', 'weight' => 1.5, 'currency' => 'NGN', ]); if ($response->isSuccessful()) { $amount = $response->getAmount(); $rates = $response->getRates(); }
Create, Track & Bill a Shipment
$shipment = Sendbox::createShipment($payload); $tracking = Sendbox::trackShipment($shipment->getTrackingCode()); $billed = Sendbox::billShipment($shipment->getTrackingCode());
Testing
vendor/bin/phpunit