/** * Sitemap (get). * * @Get("sitemap", as="sitemap.index") * * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response */ public function getIndex() { $this->siteMap->addUrls(config('sitemap.urls'), true)->addUrls($this->createSiteMapData(), false); return response($this->siteMap->saveXML(), 200, ['Content-Type' => 'text/xml; charset=utf-8']); }