forge/app/Console/Commands/ImportHubCommand.php

23 lines
507 B
PHP
Raw Normal View History

2024-06-05 16:31:29 -04:00
<?php
2025-01-30 00:23:55 -05:00
declare(strict_types=1);
2024-06-05 16:31:29 -04:00
namespace App\Console\Commands;
2024-09-12 13:19:52 -04:00
use App\Jobs\Import\ImportHubDataJob;
2024-06-05 16:31:29 -04:00
use Illuminate\Console\Command;
class ImportHubCommand extends Command
2024-06-05 16:31:29 -04:00
{
protected $signature = 'app:import-hub';
protected $description = 'Connects to the Hub database and imports the data into the Laravel database';
2024-06-05 16:31:29 -04:00
public function handle(): void
{
ImportHubDataJob::dispatch()->onQueue('long');
2024-06-05 16:31:29 -04:00
$this->info('ImportHubDataJob has been added to the queue');
2024-06-05 16:31:29 -04:00
}
}