formatting

This commit is contained in:
Denis Duliçi 2021-06-17 14:36:54 +03:00
parent a3d62187dd
commit 47c21543bd
2 changed files with 7 additions and 7 deletions

View File

@ -8,21 +8,21 @@ use App\Utilities\Reports as Utility;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Cache;
class ReportReminder extends Command class ReportCache extends Command
{ {
/** /**
* The name and signature of the console command. * The name and signature of the console command.
* *
* @var string * @var string
*/ */
protected $signature = 'reminder:report'; protected $signature = 'report:cache';
/** /**
* The console command description. * The console command description.
* *
* @var string * @var string
*/ */
protected $description = 'Calculate reminders for reports'; protected $description = 'Calculate and cache reports';
/** /**
* Execute the console command. * Execute the console command.
@ -43,18 +43,18 @@ class ReportReminder extends Command
continue; continue;
} }
$this->info('Calculate report reminders for ' . $company->name . ' company.'); $this->info('Calculating reports for ' . $company->name . ' company.');
// Set company // Set company
$company->makeCurrent(); $company->makeCurrent();
$this->remind(); $this->cacheReportsOfCurrentCompany();
} }
Company::forgetCurrent(); Company::forgetCurrent();
} }
protected function remind() protected function cacheReportsOfCurrentCompany()
{ {
$reports = Report::orderBy('name')->get(); $reports = Report::orderBy('name')->get();

View File

@ -29,7 +29,7 @@ class Kernel extends ConsoleKernel
$schedule_time = config('app.schedule_time'); $schedule_time = config('app.schedule_time');
$schedule->command('reminder:report')->everySixHours(); $schedule->command('report:cache')->everySixHours();
$schedule->command('reminder:invoice')->dailyAt($schedule_time); $schedule->command('reminder:invoice')->dailyAt($schedule_time);
$schedule->command('reminder:bill')->dailyAt($schedule_time); $schedule->command('reminder:bill')->dailyAt($schedule_time);
$schedule->command('recurring:check')->dailyAt($schedule_time); $schedule->command('recurring:check')->dailyAt($schedule_time);