2025-06-29 09:37:49 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
2025-07-05 18:26:04 +02:00
|
|
|
use App\Jobs\ArticleDiscoveryJob;
|
2025-06-29 09:37:49 +02:00
|
|
|
use Illuminate\Console\Command;
|
|
|
|
|
|
|
|
|
|
class FetchNewArticlesCommand extends Command
|
|
|
|
|
{
|
2025-06-30 18:18:30 +02:00
|
|
|
protected $signature = 'article:refresh';
|
2025-06-29 09:37:49 +02:00
|
|
|
|
2025-06-30 18:18:30 +02:00
|
|
|
protected $description = 'Fetches latest articles';
|
2025-06-29 09:37:49 +02:00
|
|
|
|
|
|
|
|
public function handle(): int
|
|
|
|
|
{
|
2025-07-05 18:26:04 +02:00
|
|
|
ArticleDiscoveryJob::dispatch();
|
2025-06-29 09:37:49 +02:00
|
|
|
|
|
|
|
|
return self::SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
}
|