onlineidentity / laravel-channable
Laravel wrapper for OnlineIdentity Channable API connector
v1.0.2
2024-11-26 14:36 UTC
Requires
- php: ^8.1
- illuminate/support: ^6|^7|^8|^9|^10|^11
- onlineidentity/channable: ^1.0
This package is auto-updated.
Last update: 2025-07-26 16:01:31 UTC
README
About
This package creates a wrapper around onlineidentity/channable for ease of use in the Laravel framework.
Installation
composer require onlineidentity/laravel-channable
(Optional) Publish the config file with php artisan vendor:publish --tag=channable
Set your .env variables
CHANNABLE_API_TOKEN='{API_TOKEN}' CHANNABLE_COMPANY_ID={COMPANY_ID} CHANNABLE_PROJECT_ID={PROJECT_ID} #default, swappable after initialization
Usage
#Examples # app()->make(); $channable = app()->make('channable'); //Get all orders $channable->orders()->allOrders(); $order_id = 12345678; $channable->orders()->shipment($order_id, [ 'tracking_code' => '3S1234567890', 'transporter' => 'POSTNL', 'order_item_ids' => [ 1, 2 ] ]); //Get all returns with queryParameters $channable->returns()->allReturns(['limit' => 2, 'last_modified_after' => '2022-01-01']); //update returns status $return_id = 12345678; $status_accepted = \OnlineIdentity\Enums\ReturnsType::ACCEPTED; $channable->returns()->updateReturnStatus($return_id, $status_accepted); # Using the facade //get all orders $orders = \OnlineIdentity\LaravelChannable\Facades\Channable::orders()->allOrders(); //change project id \OnlineIdentity\LaravelChannable\Facades\Channable::setProjectId(123456); \OnlineIdentity\LaravelChannable\Facades\Channable::orders()->shipment($order_id, [ 'tracking_code' => '3S1234567890', 'transporter' => 'POSTNL', 'order_item_ids' => [ 1, 2 ]);
For more details and options visit the offical channable docs https://api.channable.com/v1/docs