You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/resources/views/sitemap/posts.blade.php

28 lines
971 B
PHTML

2 years ago
@extends('sitemap.layout')
@section('content')
<url>
<loc>{{route('posts')}}</loc>
<lastmod>{{ $items[0]->updated_at->tz('UTC')->toAtomString() }}</lastmod>
<changefreq>weekly</changefreq>
<priority>1</priority>
</url>
@foreach($items as $item)
<url>
<loc>{{route('post.show',$item->slug)}}</loc>
2 years ago
<lastmod>{{ $item->updated_at->tz('UTC')->toAtomString() }}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
@endforeach
@if(config('app.xlang'))
@foreach(\App\Models\Xlang::where('is_default', 0)->get() as $lang)
<url>
<loc>{{route('lang.post.show',[$lang->tag,$item->slug])}}</loc>
<lastmod>{{ $item->updated_at->tz('UTC')->toAtomString() }}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
@endforeach
@endif
2 years ago
@endsection