ldc-groupe/config/sitemap-generator.php

74 lines
1.7 KiB
PHP

<?php
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
return [
/**
* Single route names
*
* Ex:
*
* 'singlePages' => [
* 'homepage',
* ],
*/
'singlePages' => [
'front.search',
],
/**
* Model namespaces with filters
*
* Ex: (modelFilters & relationFilters are not necessaries)
* 'cruds' => [
* [
* 'model' => 'App\Models\Product',
* 'modelFilters' => [
* ['published', '=', true]
* ],
* 'relationFilters' => [
* 'range' => fn(Builder $q) => $q->where('status', true),
* ],
* ],
* [
* 'model' => 'App\Models\Article',
* ]
* ],
*/
'cruds' => [
[
'model' => 'App\Models\News',
'filters' => [
['status', '=', \App\Enums\News\NewsStatusEnum::published]
],
],
[
'model' => 'App\Models\DynamicPage',
'filters' => [
['status', '=', \App\Enums\DynamicPages\PageStatusEnum::published]
],
],
],
/**
* 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 * * *',
'supported_locales' => array_keys(config('laravellocalization.supportedLocales', ['fr' => "Fr"]))
];