blissjaspis/laravel-rajaongkir-komerce 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

blissjaspis/laravel-rajaongkir-komerce

最新稳定版本:1.1.0

Composer 安装命令:

composer require blissjaspis/laravel-rajaongkir-komerce

包简介

Laravel Rajaongkir From Komerce

README 文档

README

Note This package supports Laravel versions 10, 11, and 12.

This package provides a simple and easy-to-use Laravel wrapper for the RajaOngkir Komerce API.

Installation

You can install the package via composer:

composer require bliss-jaspis/laravel-rajaongkir-komerce

You must publish the configuration file with:

php artisan vendor:publish --provider="BlissJaspis\RajaOngkir\Providers\RajaOngkirServiceProvider" --tag="config"

This will create a config/rajaongkir-komerce.php file in your config directory.

Add the following to your .env file:

RAJAONGKIR_API_KEY=your-api-key
RAJAONGKIR_BASE_URL=https://rajaongkir.komerce.id/api/v1

Usage

You can use this package by injecting the BlissJaspis\RajaOngkir\RajaOngkir class into your controller or service.

use BlissJaspis\RajaOngkir\Facades\RajaOngkir;

class YourController
{
    // ...

    public function getProvinces()
    {
        $provinces = RajaOngkir::getProvinces();

        return $provinces;
    }
}

Available Methods

  • getProvinces()
  • getCity(string $provinceId)
  • getDistrict(string $cityId)
  • getSubDistrict(string $districtId)
  • getWaybill(string $waybill, string $courier)
  • getCostDomestic(string $origin, string $destination, int $weight, string $courier, string $filter = 'lowest')
  • getCostInternational(string $origin, string $destination, int $weight, string $courier, string $filter = 'lowest')
  • searchDomestic(string $search, int $limit = 10, int $offset = 0)
  • searchInternational(string $search, int $limit = 10, int $offset = 0)
  • getListCourier()

API Reference

For more detailed information about the API endpoints, parameters, and response structures, please refer to the official RajaOngkir Komerce API Documentation.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-18