ncaneldiee / rajaongkir-laravel by ncaneldiee

Laravel Raja Ongkir API
811
0
0
Package Data
Maintainer Username: ncaneldiee
Maintainer Contact: me@ncaneldiee.com (Ncan El Diee)
Package Create Date: 2016-11-04
Package Last Update: 2016-11-06
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-24 15:02:46
Package Statistics
Total Downloads: 811
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 0
Total Watchers: 0
Total Forks: 1
Total Open Issues: 0

Laravel Raja Ongkir API

Latest Version Total Download Software License

Installation

Using composer.

$ composer require ncaneldiee/rajaongkir-laravel

Add service provider to config/app.php.

    ...
    'Ncaneldiee\Rajaongkir\Laravel\RajaongkirServiceProvider',
    ...

Add alias to config/app.php.

    ...
    'Rajaongkir\Domestic' => 'Ncaneldiee\Rajaongkir\Laravel\RajaongkirDomesticFacade',
    'Rajaongkir\International' => 'Ncaneldiee\Rajaongkir\Laravel\RajaongkirInternationalFacade',
    ...

Publish vendor.

$ php artisan vendor:publish

Configuration

Set your configuration using environment variable.

RAJAONGKIR_ACCOUNT_TYPE=YOUR_ACCOUNT_TYPE
RAJAONGKIR_API_KEY=YOUR_API_KEY

Example

Rajaongkir\Domestic::cost($origin, $destination, $weight, $courier);

Rajaongkir\Domestic::waybill($tracking_number, $courier);

Full documentation can be found at the wiki.

License

The MIT License (MIT). Please see LICENSE for more information.