mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
- Added GenerateSitemapCommand to create sitemap.xml - Updated Kernel to schedule sitemap generation weekly - Updated composer.json with spatie/laravel-sitemap dependency
20 lines
423 B
PHP
20 lines
423 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
use Spatie\Sitemap\SitemapGenerator;
|
|
|
|
class GenerateSitemapCommand extends Command
|
|
{
|
|
protected $signature = 'sitemap:generate';
|
|
|
|
protected $description = 'Command description';
|
|
|
|
public function handle(): void
|
|
{
|
|
SitemapGenerator::create('https://heimerdinger.lol')
|
|
->writeToFile(public_path('sitemap.xml'));
|
|
}
|
|
}
|