39 lines
694 B
PHP
39 lines
694 B
PHP
<?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);
|
|
|
|
}
|
|
}
|