@cache('sitemap_attach'. cacheNumber(), 3600) {{--update every 1 hour--}} @if(\App\Models\Attachment::count() > 0) {{route('client.attachments')}} {{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} weekly 0.7 @endif @foreach(\App\Models\Attachment::where('is_fillable',1)->orderBy('id')->get(['slug','updated_at']) as $item) {{route('client.attachment',$item->slug)}} {{$item->updated_at->tz('UTC')->toAtomString()}} weekly 0.5 @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\Attachment::count() > 0) {{route('client.attachments')}}/{{$lang}} {{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} weekly 0.7 @endif @foreach(\App\Models\Attachment::where('is_fillable',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item) {{$item->webUrl()}} {{$item->updated_at->tz('UTC')->toAtomString()}} weekly 0.5 @endforeach @endforeach @endif @endcache