ldc-nature-and-respect/config/sitemap-generator.php
2025-07-18 17:18:56 +02:00

86 lines
1.8 KiB
PHP

<?php
use Illuminate\Database\Eloquent\Builder;
return [
/**
* Single route names
*
* Ex:
*
* 'singlePages' => [
* 'homepage',
* ],
*/
'singlePages' => [
'home',
'contact-form',
'legals',
'privacy',
'news.index',
'products.index',
'recipes.index',
'storefinder.index',
],
/**
* Model namespaces with filters
*
* Ex:
* 'cruds' => [
* [
* 'model' => 'App\Models\Product',
* 'filters' => [
* ['published', '=', true]
* ]
* ],
* [
* 'model' => 'App\Models\Article',
* 'filters' => []
* ]
* ],
*/
'cruds' => [
[
'model' => 'App\Models\Product',
'modelFilters' => [
['status', '=', true],
],
'relationFilters' => [
'range' => fn(Builder $q) => $q->where('status', true),
]
],
[
'model' => 'App\Models\Recipe',
'modelFilters' => [
['status', '=', true]
],
],
[
'model' => 'App\Models\News',
'modelFilters' => [
['status', '=', true]
],
]
],
/**
* Enable or disable schedule for the job
* If set to true the sitemap generator will be run
* using the 'cron' instruction
*/
'schedule' => true,
/**
* If you want to set specific
* instruction for when to schedule job
* you can set this with a cron instruction
* You can generate one using https://crontab.guru/
*
* schedule must be set to true
*
* Default is every day at 15:45
*/
'cron' => '45 15 * * *',
];