2021-09-04 01:16:55 +02:00
|
|
|
<?php
|
|
|
|
|
|
2022-02-02 11:14:18 +01:00
|
|
|
use App\Enums\BreedingPageType;
|
2021-09-04 01:16:55 +02:00
|
|
|
use App\Enums\EleveurOcbStatus;
|
|
|
|
|
use App\Models\Articles;
|
2022-02-02 11:14:18 +01:00
|
|
|
use App\Models\BreedingPage;
|
2021-09-04 01:16:55 +02:00
|
|
|
use App\Models\ConsumptionTimes;
|
2021-11-16 16:00:47 +01:00
|
|
|
use App\Models\Label;
|
2021-09-04 01:16:55 +02:00
|
|
|
use App\Models\MeatTypes;
|
|
|
|
|
use App\Models\Products;
|
2021-09-21 09:26:21 +02:00
|
|
|
use App\Models\Range;
|
2022-03-02 17:28:16 +01:00
|
|
|
use App\Models\Recipes;
|
2021-09-04 01:16:55 +02:00
|
|
|
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',
|
|
|
|
|
'/la-marque/tracabilite/search',
|
|
|
|
|
'/frame',
|
|
|
|
|
'/map',
|
2022-02-10 16:14:58 +01:00
|
|
|
'/_debugbar',
|
2022-03-02 17:28:16 +01:00
|
|
|
// Hack ignore laravel debug bar.
|
2021-09-17 15:17:08 +02:00
|
|
|
'/la-marque/actualites/renderActu',
|
2021-10-13 12:06:41 +02:00
|
|
|
'/le-club-des-gaulois/les-promos/get',
|
2021-10-21 10:35:37 +02:00
|
|
|
'/{unsubscribe}',
|
2021-09-04 01:16:55 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
|
|
'routesBinder' => [
|
|
|
|
|
'product.show' => [
|
2023-01-09 11:18:35 +01:00
|
|
|
'publishedProduct' => [Products::class, 'slug']
|
2021-09-04 01:16:55 +02:00
|
|
|
],
|
|
|
|
|
'products.range' => [
|
2023-04-25 10:10:08 +00:00
|
|
|
'slugRange' => [Range::class, 'slug'],
|
|
|
|
|
'slugSubRange' => [Range::class, 'slug'],
|
2021-09-04 01:16:55 +02:00
|
|
|
],
|
|
|
|
|
'products.consumption-times' => [
|
|
|
|
|
'slugConsumptionTime' => [ConsumptionTimes::class, 'slug']
|
|
|
|
|
],
|
2022-02-02 11:14:18 +01:00
|
|
|
'breeding-page.list' => [
|
2022-03-14 14:09:43 +00:00
|
|
|
'breedingPageType' => [BreedingPageType::class, 'value']
|
2022-02-02 11:14:18 +01:00
|
|
|
],
|
|
|
|
|
'breeding-page.show' => [
|
2022-03-14 14:09:43 +00:00
|
|
|
'breedingPageType' => [BreedingPageType::class, 'value'],
|
2022-02-02 11:14:18 +01:00
|
|
|
'breeding_page' => [BreedingPage::class, 'slug']
|
|
|
|
|
],
|
2021-09-04 01:16:55 +02:00
|
|
|
'products.meat-type' => [
|
|
|
|
|
'slugMeatType' => [MeatTypes::class, 'slug']
|
|
|
|
|
],
|
2021-11-16 16:00:47 +01:00
|
|
|
'products.label' => [
|
2021-11-22 15:02:18 +01:00
|
|
|
'slugLabel' => [Label::class, 'slug']
|
2021-11-16 16:00:47 +01:00
|
|
|
],
|
2022-03-02 17:28:16 +01:00
|
|
|
'recipes.show' => [
|
|
|
|
|
'recipe' => [Recipes::class, 'slug']
|
|
|
|
|
],
|
2021-09-04 01:16:55 +02:00
|
|
|
'club.infos.child' => [
|
2021-10-03 13:49:40 +02:00
|
|
|
'articleTag' => [Articles::class, 'type'],
|
2021-09-04 01:16:55 +02:00
|
|
|
'publishedArticle' => [Articles::class, 'slug']
|
|
|
|
|
],
|
2021-10-03 13:49:40 +02:00
|
|
|
'club.indexByCategory' => [
|
|
|
|
|
'articleTag' => [Articles::class, 'type']
|
|
|
|
|
]
|
2021-09-04 01:16:55 +02:00
|
|
|
],
|
|
|
|
|
/**
|
|
|
|
|
* 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,
|
2023-04-25 10:10:08 +00:00
|
|
|
'ocbStatus' => strval(EleveurOcbStatus::yes()->value),
|
2021-09-04 01:16:55 +02:00
|
|
|
'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 * * *'
|
|
|
|
|
];
|