22 lines
430 B
PHP
22 lines
430 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\Article\ArticleFetcher;
|
|
use Illuminate\Console\Command;
|
|
|
|
class FetchNewArticlesCommand extends Command
|
|
{
|
|
protected $signature = 'articles:fetch';
|
|
|
|
protected $description = 'Fetches new articles';
|
|
|
|
public function handle(): int
|
|
{
|
|
logger('Fetch new articles command');
|
|
|
|
ArticleFetcher::getNewArticles();
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|