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\Support\Facades\Cache;
class ReportReminder extends Command
class ReportCache extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'reminder:report';
protected $signature = 'report:cache';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Calculate reminders for reports';
protected $description = 'Calculate and cache reports';
/**
* Execute the console command.
@ -43,18 +43,18 @@ class ReportReminder extends Command
continue;
}
$this->info('Calculate report reminders for ' . $company->name . ' company.');
$this->info('Calculating reports for ' . $company->name . ' company.');
// Set company
$company->makeCurrent();
$this->remind();
$this->cacheReportsOfCurrentCompany();
}
Company::forgetCurrent();
}
protected function remind()
protected function cacheReportsOfCurrentCompany()
{
$reports = Report::orderBy('name')->get();

View File

@ -29,7 +29,7 @@ class Kernel extends ConsoleKernel
$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:bill')->dailyAt($schedule_time);
$schedule->command('recurring:check')->dailyAt($schedule_time);