Download the PHP package centrex/laravel-courier without Composer
On this page you can find all versions of the php package centrex/laravel-courier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download centrex/laravel-courier
More information about centrex/laravel-courier
Files in centrex/laravel-courier
Package laravel-courier
Short Description This is my package courier
License MIT
Homepage https://github.com/centrex/courier
Informations about the package laravel-courier
Laravel Courier
Laravel package for Bangladeshi courier integrations. It provides:
- package API routes for parcel tracking
- a simple facade / root service for common tracking calls
- dedicated service classes for courier-specific operations
Currently included couriers:
PathaoRedxSteadfastRokomariSundarban
Features
- Track parcels through package routes
- Use courier integrations directly from Laravel services
- Grouped config per courier
- Token-based auth support for couriers that require it
- Built-in tests for the package routes
Installation
Install via Composer:
Publish the config:
Configuration
Published config:
Example .env values:
Package Routes
By default the package exposes these endpoints:
| Endpoint | Method | Description |
|---|---|---|
/api/redx/{tracking_number} |
GET |
Track Redx parcel |
/api/steadfast/{tracking_number} |
GET |
Track Steadfast parcel |
/api/pathao |
POST |
Track Pathao parcel |
/api/rokomari |
POST |
Track Rokomari parcel |
/api/sundarban |
POST |
Track Sundarban parcel |
Named routes:
| Route Name | Purpose |
|---|---|
courier.redx.track |
Redx tracking |
courier.steadfast.track |
Steadfast tracking |
courier.pathao.track |
Pathao tracking |
courier.rokomari.track |
Rokomari tracking |
courier.sundarban.track |
Sundarban tracking |
Route Prefix Example
If you want /api/courier/... instead of /api/...:
That produces:
/api/courier/redx/{tracking_number}/api/courier/steadfast/{tracking_number}/api/courier/pathao/api/courier/rokomari/api/courier/sundarban
Basic Usage
Resolve the main service from the container
Use the facade
API Examples
Redx
Steadfast
Pathao
Rokomari
Sundarban
Advanced Service Usage
For courier-specific features, resolve the dedicated service class directly.
PathaoService
Create a store:
Create an order:
Calculate price:
RedxService
RokomariService
SteadfastService
SundarbanService
Controller Example
Example controller usage inside your Laravel app:
Error Handling Example
Notes
CourierandCourierfacade currently expose the common tracking methods only.- Advanced Pathao and Redx operations are available through their dedicated service classes.
RokomariService::track()returns HTML, not a JSON array.- Pathao and Redx integrations depend on valid credentials or access tokens in config.
Testing
Changelog
Please see CHANGELOG for more information on recent changes.
Contributing
Please see CONTRIBUTING for details.
Credits
- rochi88
- All Contributors
License
The MIT License (MIT). See LICENSE.
All versions of laravel-courier with dependencies
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0