[![Latest Version on Packagist][ico-version]][link-packagist] [![Total Downloads][ico-downloads]][link-downloads]
Install the package with composer:
composer require core45/laravel-baselinker
Optionally ublish the package files:
php artisan vendor:publish --provider="Core45\LaravelBaselinker\BaselinkerServiceProvider"
The package should be auto-discovered by Laravel.
After installation add BASELINKER_TOKEN={your-token}
to your .env
file.
Baselinker API is devided into 4 main parts:
- Product catalog
- External storages
- Orders
- Courier shipments
- Products storage [OBSOLETE] - not implemented in this package
To access any of the methods use Baselinker
facade and use one of the main shortcut methods followed by the API method name.
- Baselinker::catalog()->someMethod('someParameters')
- Baselinker::externalStorage()->...
- Baselinker::order()->...
- Baselinker::shipment()->...
use Core45\LaravelBaselinker\Facades\Baselinker;
$categories = Baselinker::categories()->getCategories();
use Core45\LaravelBaselinker\Facades\Baselinker;
$catalog = Baselinker::catalog();
$result = $catalog->addInventoryPriceGroup('For Spain', 'Price group for Spain', 'EUR');
If you find any errors or would like to help with improving and maintaining the package please leave the comment.