PHPackages                             erfanbagussetiana/rajaongkirpro - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. erfanbagussetiana/rajaongkirpro

ActivePackage

erfanbagussetiana/rajaongkirpro
===============================

Raja Ongkir API Laravel 5

0362↓100%2[1 issues](https://github.com/erfanbagussetiana/rajaongkirpro/issues)PHP

Since Apr 13Pushed 7y agoCompare

[ Source](https://github.com/erfanbagussetiana/rajaongkirpro)[ Packagist](https://packagist.org/packages/erfanbagussetiana/rajaongkirpro)[ RSS](/packages/erfanbagussetiana-rajaongkirpro/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (1)Used By (0)

rajaongkir API For Laravel 5
============================

[](#rajaongkir-api-for-laravel-5)

API ini digunakan untuk type akun starter,basic dan pro

**Instalasi**

Download package dengan composer

```
composer require erfanbagussetiana/rajaongkirpro

```

atau

```
{
	"require": {
		"erfanbagussetiana/rajaongkirpro" : "dev-master"
	}
}

```

Tambahkan service provider ke config/app.php

```
'providers' => [
	....

	erfanbagussetiana\rajaongkirpro\RajaOngkirServiceProvider::class,
]
```

Tambahkan juga aliasnya ke config/app.php

```
'aliases' => [
	....

	'RajaOngkir' => erfanbagussetiana\rajaongkirpro\RajaOngkirFacade::class,
]
```

Buat file rajaongkir.php di folder config secara manual atau jalankan command artisan

```
php artisan vendor:publish

```

jika anda menggunakan command artisan diatas, anda akan dibuatkan file rajaongkir.php di folder config

Tambahkan kode berikut di file .env untuk konfigurasi API rajaongkir

```
RAJAONGKIR_ENDPOINTAPI=isi_base_url_api_akun_anda_disini
RAJAONGKIR_APIKEY=isi_api_key_anda_disini

```

atau anda juga dapat langsung melakukan konfigurasi di file rajaongkir.php di folder config seperti kode berikut.

```
'end_point_api' => 'isi_base_url_api_akun_anda_disini',
'api_key' => 'isi_api_key_anda_disini',
```

**Penggunaan**

Ambil data provinsi

```
$data = RajaOngkir::Provinsi()->all();
```

Ambil jumlah provinsi

```
$data = RajaOngkir::Provinsi()->count();
```

Ambil data provinsi berdasarkan id provinsi

```
$data = RajaOngkir::Provinsi()->find($id);
```

Ambil data provinsi berdasarkan nama provinsi

```
$data = RajaOngkir::Provinsi()->search('province', $name = "ja")->get();
```

Ambil data kota

```
$data = RajaOngkir::Kota()->all();
```

Ambil jumlah kota

```
$data = RajaOngkir::Kota()->count();
```

Ambil data kota berdasarkan id kota

```
$data = RajaOngkir::Kota()->find($id);
```

Ambil data kota berdasarkan nama kota

```
$data = RajaOngkir::Kota()->search('city_name', $name = "banyu")->get();
```

Ambil data kota berdasarkan provinsi

```
$data = RajaOngkir::Kota()->byProvinsi($provinsi_id)->get();
```

Ambil jumlah kota berdasarkan provinsi

```
$data = RajaOngkir::Kota()->byProvinsi($provinsi_id)->count();
```

Ambil data kota berdasarkan nama kota di suatu provinsi

```
$data = RajaOngkir::Kota()->byProvinsi($provinsi_id)->search('city_name', $name)->get();
```

Ambil data Kecamatan

```
$data = RajaOngkir::Kecamatan()->byKota($city_id)->get();
```

Ambil jumlah Kecamatan

```
$data = RajaOngkir::Kecamatan()->byKota($city_id)->count();
```

Ambil data Kecamatan berdasarkan id Kecamatan

```
$data = RajaOngkir::Kecamatan()->find($subdistrict_id);
```

Ambil data Kecamatan berdasarkan nama Kecamatan di suatu kota

```
$data = RajaOngkir::Kecamatan()->byKota($city_id)->search('subdistrict_name', $name)->get();
```

Ambil Biaya Pengiriman

```
$data = RajaOngkir::Cost([
	'origin' 		=> 501, // id kota asal
	'destination' 	=> 114, // id kota tujuan
	'weight' 		=> 1700, // berat satuan gram
	'courier' 		=> 'jne', // kode kurir pengantar ( jne / tiki / pos )
])->get();
```

Kunjungi [rajaongkir](http://rajaongkir.com/)

Documentasi akun [starter](http://rajaongkir.com/dokumentasi/starter)
Documentasi akun [basic](https://rajaongkir.com/dokumentasi/basic)
Documentasi akun [pro](https://rajaongkir.com/dokumentasi/pro)

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e752c6a0eaf1bb1410346f00606e6440080fd24b3eab108fe153a6835a91b246?d=identicon)[erfanbagussetiana](/maintainers/erfanbagussetiana)

---

Top Contributors

[![erfanbagus](https://avatars.githubusercontent.com/u/18006162?v=4)](https://github.com/erfanbagus "erfanbagus (2 commits)")[![erfanbagussetiana](https://avatars.githubusercontent.com/u/37232884?v=4)](https://github.com/erfanbagussetiana "erfanbagussetiana (1 commits)")

### Embed Badge

![Health badge](/badges/erfanbagussetiana-rajaongkirpro/health.svg)

```
[![Health](https://phpackages.com/badges/erfanbagussetiana-rajaongkirpro/health.svg)](https://phpackages.com/packages/erfanbagussetiana-rajaongkirpro)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
