Remove Job generate sitemap in favor of package kwaadpepper/refresh-sitemap
123 lines
3.2 KiB
PHP
123 lines
3.2 KiB
PHP
<?php
|
|
|
|
use App\Enums\BalancedMenuType;
|
|
use App\Enums\EleveurOcbStatus;
|
|
use App\Models\Articles;
|
|
use App\Models\ConsumptionTimes;
|
|
use App\Models\MeatTypes;
|
|
use App\Models\Products;
|
|
use App\Models\Ranges;
|
|
use Spatie\Sitemap\Tags\Url;
|
|
|
|
return [
|
|
|
|
'ignoreRoutes' => [
|
|
'/login',
|
|
'/bo',
|
|
'/activer',
|
|
'/deconnexion',
|
|
'/reinitialiser-mot-de-passe',
|
|
'/le-club-des-gaulois/la-boutique',
|
|
'/password/confirm',
|
|
'/produit/from-menus',
|
|
'/cote-cuisine/sante-et-nutrition/menu-equilibre-j',
|
|
'/la-marque/tracabilite/search',
|
|
'/frame',
|
|
'/map',
|
|
'/_debugbar' // Hack ignore laravel debug bar
|
|
],
|
|
|
|
'routesBinder' => [
|
|
'product.show' => [
|
|
'product' => [Products::class, 'slug']
|
|
],
|
|
'products.range' => [
|
|
'slugRange' => [Ranges::class, 'slug']
|
|
],
|
|
'products.consumption-times' => [
|
|
'slugConsumptionTime' => [ConsumptionTimes::class, 'slug']
|
|
],
|
|
'products.meat-type' => [
|
|
'slugMeatType' => [MeatTypes::class, 'slug']
|
|
],
|
|
'kitchen-side.health-nutrition.balanced-menu.menu' => [
|
|
'type' => [BalancedMenuType::class, 'type']
|
|
],
|
|
'club.infos.child' => [
|
|
'publishedArticle' => [Articles::class, 'slug']
|
|
],
|
|
],
|
|
|
|
/**
|
|
* You can put route conditions here
|
|
* These will be used to decide whether the route should appear
|
|
* in the sitemap or not
|
|
*
|
|
* These are called in Eloquent where
|
|
*
|
|
* example
|
|
*
|
|
* 'queryConditions' => [
|
|
* 'status' => true,
|
|
* 'ocbStatus' => EleveurOcbStatus::yes()->value,
|
|
* 'star_moment' => true
|
|
* ]
|
|
*
|
|
*/
|
|
'queryConditions' => [
|
|
'status' => true,
|
|
'ocbStatus' => EleveurOcbStatus::yes()->value,
|
|
'star_moment' => true
|
|
],
|
|
|
|
/**
|
|
* The default route frequency to use with sitemap generator
|
|
*/
|
|
'routeDefaultFrequency' => Url::CHANGE_FREQUENCY_DAILY,
|
|
|
|
/**
|
|
* The default route priority to use with sitemap generator
|
|
*
|
|
* priority should be a number between 0 and 1
|
|
* https://www.sitemaps.org/protocol.html
|
|
*/
|
|
'routeDefaultPriority' => 0.5,
|
|
|
|
/**
|
|
* Frequencies for routes
|
|
* use the full or partial route name as index
|
|
* and a frequency within \Spatie\Sitemap\Tags\Url constants
|
|
*/
|
|
'routeFrequencies' => [
|
|
'product-request' => Url::CHANGE_FREQUENCY_WEEKLY
|
|
],
|
|
|
|
/**
|
|
* Priorities for routes
|
|
* use the full or partial route name as index
|
|
* and a priority number between 0 and 1
|
|
*/
|
|
'routePriorities' => [
|
|
'product-request' => 0.6
|
|
],
|
|
|
|
/**
|
|
* 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/
|
|
* https://laravel.com/docs/8.x/scheduling#schedule-frequency-options
|
|
*
|
|
* schedule must be set to true
|
|
*
|
|
* Default is every day at 15:45
|
|
*/
|
|
'cron' => '45 15 * * *'
|
|
];
|