-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use Illuminate\Console\Command; | ||
use Irfa\RajaOngkir\Caching\ROCache; | ||
use Irfa\RajaOngkir\Ongkir\Ongkir as RajaOngkir; | ||
|
||
class RORefresh extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'raja-ongkir:refresh'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Refresh Cache'; | ||
|
||
/** | ||
* Create a new command instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
echo "---------------------".PHP_EOL; | ||
echo"Refresh Cache".PHP_EOL; | ||
echo"---------------------".PHP_EOL; | ||
ROCache::clearCache(); | ||
sleep(1);//Cooling Down | ||
echo PHP_EOL."---------------------".PHP_EOL; | ||
echo"Province Caching".PHP_EOL; | ||
echo"---------------------".PHP_EOL; | ||
RajaOngkir::cachingProvince(); | ||
echo PHP_EOL."---------------------".PHP_EOL; | ||
sleep(1);//Cooling Down | ||
echo"City Caching".PHP_EOL; | ||
echo "---------------------".PHP_EOL; | ||
RajaOngkir::cachingCity(); | ||
echo PHP_EOL."---------------------".PHP_EOL; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters