@cache('sitemap_post'. cacheNumber(), 3600) @if(\App\Models\Post::count() > 0) {{route('client.posts')}} {{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} weekly 1 @endif @foreach(\App\Models\Post::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item) {{route('client.post',$item->slug)}} {{$item->updated_at->tz('UTC')->toAtomString()}} weekly 3 @endforeach @if(config('app.xlang.active')) @foreach(\App\Models\XLang::where('is_default',0)->pluck('tag')->toArray() as $lang) @php(app()->setLocale($lang)) @if(\App\Models\Post::count() > 0) {{route('client.posts')}}/{{$lang}} {{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} weekly 1 @endif @foreach(\App\Models\Post::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item) {{$item->webUrl()}} {{$item->updated_at->tz('UTC')->toAtomString()}} weekly 3 @endforeach @endforeach @endif @endcache