This commit is contained in:
Doar Mihai
2026-05-01 03:14:52 +03:00
parent 17097c3bb1
commit 96e8fa3859
9 changed files with 284 additions and 1 deletions
+16 -1
View File
@@ -66,11 +66,26 @@ class SitemapController extends Controller
{
$xml = $this->cacheService->remember(
'sitemap:jobs',
1800, // 30 minutes cache (jobs change more frequently)
1800,
fn() => $this->sitemapService->generateJobsSitemap()
);
return response($xml, 200)
->header('Content-Type', 'application/xml');
}
/**
* Generate and serve blog sitemap
*/
public function blogSitemap(): Response
{
$xml = $this->cacheService->remember(
'sitemap:blog',
3600,
fn() => $this->sitemapService->generateBlogSitemap()
);
return response($xml, 200)
->header('Content-Type', 'application/xml');
}
}