1
-
2
-
3
-
4
-
5
1
# Raja Ongkir Laravel Package
6
2
[ ![ License] ( https://poser.pugx.org/irfa/raja-ongkir/license?format=flat )] ( https://packagist.org/packages/irfa/raja-ongkir )
7
3
<h3 >Installation with Composer</h3 >
13
9
***
14
10
15
11
16
- <h3 >PHP Native Setup</h3 >
12
+ <h2 >PHP Native Setup</h2 >
17
13
18
14
19
15
<?php
37
33
38
34
39
35
***
40
- <h3 > Laravel Setup </h3 >
36
+ <h2 > Laravel Setup </h2 >
41
37
42
38
<h3 >Add to config/app.php</h3 >
43
39
56
52
57
53
],
58
54
59
- <h3 >Publish Vendor</h3 >
55
+ <h2 >Publish Vendor</h2 >
60
56
61
57
62
58
php artisan vendor:publish --tag=raja-ongkir
@@ -67,7 +63,7 @@ Open .env file add
67
63
RAJAONGKIR_ACCOUNT_TYPE = starter
68
64
RAJAONGKIR_API_KEY = your-api-key
69
65
***
70
- <h3 >Caching</h3 >
66
+ <h2 >Caching</h2 >
71
67
72
68
> Caching is useful for loading city and province faster.
73
69
@@ -95,7 +91,7 @@ Open console/cmd and run
95
91
96
92
use RajaOngkir;
97
93
98
- ** Get all province**
94
+ ** Retrieve all province**
99
95
100
96
$get = RajaOngkir::getProvince();
101
97
foreach($get as $prov):
@@ -115,7 +111,7 @@ Open console/cmd and run
115
111
echo $get->province."<br>";// value = Bali
116
112
117
113
118
- ** Get all City**
114
+ ** Retrieve all City**
119
115
120
116
$get = RajaOngkir::getCity();
121
117
foreach($get as $city):
@@ -129,7 +125,7 @@ Open console/cmd and run
129
125
130
126
endforeach;
131
127
132
- ** Get all City in province**
128
+ ** Retrieve all city in province**
133
129
134
130
135
131
$get = RajaOngkir::find(['province_id' => 1])->getCity();
@@ -143,7 +139,7 @@ Open console/cmd and run
143
139
echo $city->postal_code."<br>"; // value = 80351
144
140
145
141
endforeach;
146
- ** Get courier**
142
+ ** Retrieve courier**
147
143
148
144
149
145
$get = RajaOngkir::find(['origin'=>1,
@@ -159,7 +155,7 @@ Open console/cmd and run
159
155
160
156
endforeach;
161
157
162
- ** Example cost Courier **
158
+ ** Retrieve cost courier **
163
159
164
160
165
161
$params = ['origin'=>1,'destination'=>2,'weight'=>1000,'courier' => 'jne'
0 commit comments