Files
HeimerdingerLoL/app/Console/Kernel.php
Rico van Zelst c6f9423241 feat(commands): add GenerateSitemapCommand for sitemap generation
- Added GenerateSitemapCommand to create sitemap.xml
- Updated Kernel to schedule sitemap generation weekly
- Updated composer.json with spatie/laravel-sitemap dependency
2024-02-26 17:48:22 +01:00

30 lines
678 B
PHP

<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('db:seed --force')->twiceDaily(1, 13)->timezone('Europe/Amsterdam');
$schedule->command('sitemap:generate')->weekly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}