Skip to content

Commit ed54afd

Browse files
committed
Fix SubDistrict
1 parent 66268d7 commit ed54afd

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,36 +100,36 @@ Open .env file and add this line
100100
101101
php artisan migrate
102102

103-
<h3>Caching Province and City</h3><br>
103+
<h3>Caching Province,Sub-District and City</h3><br>
104104

105105
Open console/cmd and run
106106

107-
php artisan raja-ongkir:cache
107+
php artisan raja-ongkir:cache all
108108

109109
<h3>Caching City</h3><br>
110110

111111
Open console/cmd and run
112112

113-
php artisan raja-ongkir:city-cache
113+
php artisan raja-ongkir:cache city
114114

115115
<h3>Caching Province</h3><br>
116116

117117
Open console/cmd and run
118118

119-
php artisan raja-ongkir:prov-cache
119+
php artisan raja-ongkir:cache province
120120

121121
<h3>Clear Cache</h3><br>
122122

123123
Open console/cmd and run
124124

125-
php artisan raja-ongkir:clear
125+
php artisan raja-ongkir:cache clear
126126

127127
<h3>Refresh Cache</h3><br>
128128

129129
Clear old cache and create latest cache.<br>
130130
Open console/cmd and run
131131

132-
php artisan raja-ongkir:refresh
132+
php artisan raja-ongkir:cache refresh
133133

134134
***
135135

src/Ongkir/Ongkir.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ public static function cachingProvince()
5252

5353
public static function cachingSubDistrict()
5454
{
55+
if(strtolower(config('irfa.rajaongkir.account_type')) == "starter")
56+
{
57+
echo "Tidak dapat mengambil SubDistrict dikarenakan akun yg anda pakai tipe starter.";
58+
return true;
59+
}
5560
$get = self::cityData();
5661
$count = count($get);
5762
$i=0;

0 commit comments

Comments
 (0)