47 lines
965 B
PHP
47 lines
965 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use App\Jobs\CsvSalariesReader as JobCsvSalarieReader;
|
|
|
|
class ImportSalaries extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'import:salaries';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Import Salaries, pour provision des clients';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function handle()
|
|
{
|
|
$this->info('Running the Job, this could take some time.');
|
|
$job = new JobCsvSalarieReader();
|
|
$job->console = $this;
|
|
$job->handle();
|
|
$this->info('Job completed');
|
|
}
|
|
}
|