2022-11-01 11:24:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
|
|
|
|
use App\Jobs\TicProcess as Job;
|
|
|
|
|
|
|
|
class TicProcess extends Command
|
|
|
|
{
|
2023-06-27 07:39:11 +00:00
|
|
|
/**
|
|
|
|
* The name and signature of the console command.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $signature = 'tic:process'
|
2022-11-11 12:34:33 +00:00
|
|
|
.' {file : TIC file}'
|
|
|
|
.' {domain? : Domain Name}';
|
2022-11-01 11:24:36 +00:00
|
|
|
|
2023-06-27 07:39:11 +00:00
|
|
|
/**
|
|
|
|
* The console command description.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $description = 'Process a TIC file';
|
2022-11-01 11:24:36 +00:00
|
|
|
|
2023-06-27 07:39:11 +00:00
|
|
|
/**
|
|
|
|
* Execute the console command.
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
2022-11-01 11:24:36 +00:00
|
|
|
// Dispatch job.
|
2022-11-11 12:34:33 +00:00
|
|
|
Job::dispatchSync($this->argument('file'),$this->argument('domain'));
|
2022-11-01 11:24:36 +00:00
|
|
|
|
2023-06-27 07:39:11 +00:00
|
|
|
return Command::SUCCESS;
|
|
|
|
}
|
|
|
|
}
|