$items */ public function renderIndex(array $items): string { return \view('sitemaps.index', [ 'items' => $items, ])->render(); } /** * @param list $items */ public function renderUrlset(array $items): string { return \view('sitemaps.urlset', [ 'items' => $items, 'hasImages' => \collect($items)->contains(fn (SitemapUrl $item): bool => $item->images !== []), ])->render(); } /** * @param list $items */ public function renderGoogleNewsUrlset(array $items): string { return \view('sitemaps.news-urlset', [ 'items' => $items, ])->render(); } public function xmlResponse(string $content): Response { return \response($content, 200, [ 'Content-Type' => 'application/xml; charset=UTF-8', 'Cache-Control' => 'public, max-age=' . max(60, (int) \config('sitemaps.cache_ttl_seconds', 900)), ]); } }