2017 © Pedro Peláez
 

library ongkir

Laravel 4 Ongkir.info api

image

totox777/ongkir

Laravel 4 Ongkir.info api

  • Tuesday, July 23, 2013
  • by totox777
  • Repository
  • 1 Watchers
  • 0 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel-4-Ongkir-JNE

Laravel 4 ongkir jne based on ongkir.info wrapper, (*1)


add this line to your composer.json, (*2)

"totox777/ongkir": "dev-master"

and then, Run :, (*3)

composer update to pull down the latest version., (*4)

add this line to your app.php provider array:, (*5)

'Totox777\Ongkir\OngkirServiceProvider',

and add this line to app.php aliases array:, (*6)

'Ongkir' => 'Totox777\Ongkir\Facades\Profiler',

config: don't forget to chage the api-key you got from ongkir.info in src/config/config.php, (*7)

Sample Usage:, (*8)

$result = Ongkir::getCost('denpasar','pontianak',1);
if($result!=null){
    $prices = $result['price'];
    $city = $result['city'];

    echo 'Ongkos kirim dari ' . $city->origin . ' ke ' . $city->destination . '<br /><br />';

    foreach ($prices->item as $item)
    {
        echo 'Layanan: ' . $item->service . ', dengan harga : Rp. ' . $item->value . ',- <br />';
    }
}
else{
    echo 'Tidak ditemukan jalur pengiriman dari asal ke tujuan';
}

The Versions

23/07 2013

dev-master

9999999-dev

Laravel 4 Ongkir.info api

  Sources   Download

BSD-2-Clause

The Requires

 

by @totox777