X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FHttp%2FControllers%2FSitemapXmlController.php;fp=app%2FHttp%2FControllers%2FSitemapXmlController.php;h=daa3699b714d72fd4f8ee4a9e6edcbdfe5896546;hb=a655f476292d8081a23653fc1b9228f4fb64faa4;hp=1bd7749589507c3b5aad322bb2b914848a3cc097;hpb=6b75ddb40eedcdf1b27e82b94b6f0fa7a4af0547;p=alttp.git diff --git a/app/Http/Controllers/SitemapXmlController.php b/app/Http/Controllers/SitemapXmlController.php index 1bd7749..daa3699 100644 --- a/app/Http/Controllers/SitemapXmlController.php +++ b/app/Http/Controllers/SitemapXmlController.php @@ -24,12 +24,12 @@ class SitemapXmlController extends Controller $url = new SitemapUrl(); $url->path = '/tech'; - $url->lastmod = Technique::latest()->first()->created_at; + $url->lastmod = Technique::where('type', '=', 'tech')->where('index', true)->latest()->first()->created_at; $url->changefreq = 'monthly'; $url->priority = 0.5; $urls[] = $url; - foreach (Technique::where('index', true)->get() as $tech) { + foreach (Technique::where('type', '=', 'tech')->where('index', true)->get() as $tech) { $url = new SitemapUrl(); $url->path = '/tech/'.rawurlencode($tech->name); $url->lastmod = $tech->updated_at ? $tech->updated_at : ($tech->created_at ? $tech->created_at : now());