Skip to content

Commit

Permalink
Fix SubDistrict
Browse files Browse the repository at this point in the history
  • Loading branch information
irfaardy committed Jul 24, 2020
1 parent 66268d7 commit ed54afd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,36 +100,36 @@ Open .env file and add this line
php artisan migrate

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

Open console/cmd and run

php artisan raja-ongkir:cache
php artisan raja-ongkir:cache all

<h3>Caching City</h3><br>

Open console/cmd and run

php artisan raja-ongkir:city-cache
php artisan raja-ongkir:cache city

<h3>Caching Province</h3><br>

Open console/cmd and run

php artisan raja-ongkir:prov-cache
php artisan raja-ongkir:cache province

<h3>Clear Cache</h3><br>

Open console/cmd and run

php artisan raja-ongkir:clear
php artisan raja-ongkir:cache clear

<h3>Refresh Cache</h3><br>

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

php artisan raja-ongkir:refresh
php artisan raja-ongkir:cache refresh

***

Expand Down
5 changes: 5 additions & 0 deletions src/Ongkir/Ongkir.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public static function cachingProvince()

public static function cachingSubDistrict()
{
if(strtolower(config('irfa.rajaongkir.account_type')) == "starter")
{
echo "Tidak dapat mengambil SubDistrict dikarenakan akun yg anda pakai tipe starter.";
return true;
}
$get = self::cityData();
$count = count($get);
$i=0;
Expand Down

0 comments on commit ed54afd

Please sign in to comment.