forge/app/Console/Commands/ImportHub.php

22 lines
512 B
PHP
Raw Normal View History

2024-06-05 16:31:29 -04:00
<?php
namespace App\Console\Commands;
use App\Jobs\ImportHubData;
2024-06-05 16:31:29 -04:00
use Illuminate\Console\Command;
class ImportHub extends Command
{
protected $signature = 'app:import-hub';
protected $description = 'Connects to the Hub database and imports the data into the Laravel database.';
public function handle(): void
{
// Add the ImportHubData job to the queue.
ImportHubData::dispatch()->onQueue('long');
2024-06-05 16:31:29 -04:00
$this->info('The import job has been added to the queue.');
2024-06-05 16:31:29 -04:00
}
}