![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/inventory.corals.io/Corals/modules/Payment/Common/Console/ |
<?php namespace Corals\Modules\Payment\Common\Console; use Illuminate\Console\Command; class Cleanup extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'currency:cleanup'; /** * The console command description. * * @var string */ protected $description = 'Cleanup currency cache'; /** * Currency instance * * @var \Corals\Modules\Payment\Classes\Currency */ protected $currency; /** * Create a new command instance. */ public function __construct() { $this->currency = app('currency'); parent::__construct(); } /** * Execute the console command for Laravel 5.4 and below * * @return void */ public function fire() { $this->handle(); } /** * Execute the console command. * * @return void */ public function handle() { // Clear cache $this->currency->clearCache(); $this->comment('Currency cache cleaned.'); // Force the system to rebuild cache $this->currency->getCurrencies(); $this->comment('Currency cache rebuilt.'); } }