ldc-legaulois/app/Console/Commands/UpdateReductions.php
2021-03-21 22:51:19 +01:00

41 lines
908 B
PHP

<?php
namespace App\Console\Commands;
use App\Jobs\UpdateReductions as JobsUpdateReductions;
use App\Models\Reductions;
use Carbon\Carbon;
use Illuminate\Console\Command;
//phpcs:disable Generic.Files.LineLength.TooLong
class UpdateReductions extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'reductions:update';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Update the reductions that the application get from MesBR';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$this->info('Running the Job, this could take some time.');
$job = new JobsUpdateReductions();
$job->console = $this;
$job->handle();
$this->info('Job completed');
}
}