naxon / laravel-aftership
An AfterShip API wrapper for Laravel
Installs: 3 726
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.1.3
- aftership/aftership-php-sdk: ^5.1
- illuminate/support: >=5.6.0
This package is auto-updated.
Last update: 2021-07-30 16:32:00 UTC
README
This package provides an AfterShip PHP SDK wrapper for Laravel.
Installation
Install the package through composer:
composer require naxon/laravel-aftership:^1.0.0
Then publish the config file:
php artisan vendor:publish --provider="Naxon\AfterShip\AfterShipServiceProvider" --tag="config"
And finally, add your AfterShip API Key to your .env
file:
AFTERSHIP_API_KEY=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Usage
The four classes provided by the sdk are available as facades:
<?php use Naxon\AfterShip\Facades\Couriers; use Naxon\AfterShip\Facades\LastCheckPoint; use Naxon\AfterShip\Facades\Notifications; use Naxon\AfterShip\Facades\Trackings; $allTrackings = Trackings::all(); $allCouriers = Couriers::all(); $lastCheckPoint = LastCheckPoint::getById('123123'); $notification = Notifications::getById('123123');
For further usage information please read the documentation below.
Documentation
Available in the official sdk repository and the official documentation
Testing
Coming soon...
Credits
License
The MIT License (MIT). Please see License File for more information.