mergeUrls to append url for any specific route name. * * @param \LDC\SitemapGenerator\Lib\Sitemap $sitemap * @return void */ public static function append(Sitemap $sitemap): void { // * Ajouts des éléments qui sont affichés en random $sitemap->mergeUrls(Product::query()->where('status', true)->pluck('slug')->transform(function (string $slug) { return \route('fo.product.show', $slug); })); $sitemap->mergeUrls(Advice::query() ->where('status', true)->where('type', AdviceTypeEnum::recipes) ->pluck('slug')->transform(function (string $slug) { return \route('fo.recipes.show', $slug); })); $sitemap->mergeUrls(Advice::query() ->where('status', true)->where('type', AdviceTypeEnum::tips) ->pluck('slug')->transform(function (string $slug) { return \route('fo.tips.show', $slug); })); } }