123movies-seo/app/Console/Commands/GenerateSitemap.php

40 lines
694 B
PHP
Raw Normal View History

2024-08-24 23:08:42 +03:00
<?php
namespace App\Console\Commands;
use App\Services\ApiClient;
use App\Services\SitemapGenerator;
use Illuminate\Console\Command;
class GenerateSitemap extends Command
{
/**
* @var string
*/
protected $signature = 'sitemap:generate';
/**
* @var string
*/
protected $description = 'Generate sitemaps for all site resources.';
/**
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle(ApiClient $apiClient)
{
return app(SitemapGenerator::class)->generate($apiClient);
}
}