brianrizqi / rajaongkirapipro
Rajaongkir Pro for Laravel 6
dev-master
2022-05-25 05:04 UTC
This package is auto-updated.
Last update: 2024-09-25 09:36:55 UTC
README
安装
通过 Composer
$ composer require brianrizqi/rajaongkirapipro
用法
使用 php artisan vendor:publish 添加配置
添加 .env 文件
RAJAONGKIR_ENDPOINTAPI=https://pro.rajaongkir.com/api/
RAJAONGKIR_APIKEY=your-api-key
RAJAONGKIR_ORIGIN=subdistrict_id or city_id
RAJAONGKIR_ORIGIN_TYPE=subdistrict or city
Province::all() -> get all province
Province::find(id) -> get spesific province by id
Province::cities($province_id) -> get city from provinces
City::all() -> get all city
City::find(id) -> get spesific city by id
City::subdistrict($city_id) -> get subdistrict from city
Subdistrict::find($id) -> get spesific subdistrict by id
Api::calculateCost($city_id or $subdistrict_id, 'city' or 'subdistrict',weight, courier) -> check cost
Api::waybill($waybill,$courier)
安全
如果您发现任何安全问题,请发送电子邮件至 rizqibrian27@gmail.com 而不是使用问题跟踪器。
许可证
许可证。有关更多信息,请参阅 许可证文件。