mirror of https://github.com/4xmen/xshop.git
improved sitemap
parent
239ae1009c
commit
ed4d58bd4d
@ -1,192 +0,0 @@
|
|||||||
<? xml version = "1.0" encoding = "utf-8" ?>
|
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
||||||
|
|
||||||
@if(\App\Models\Product::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.products')}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>daily</changefreq>
|
|
||||||
<priority>1</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Post::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.posts')}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>1</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Gallery::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.galleries')}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>2</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Attachment::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.attachments')}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>2</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Clip::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.clips')}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>2</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@foreach(\App\Models\Product::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.product',$item->slug)}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Post::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.post',$item->slug)}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Clip::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.clip',$item->slug)}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Gallery::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.gallery',$item->slug)}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Attachment::where('is_fillable',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.attachment',$item->slug)}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@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\Product::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.products')}}/{{$lang}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>daily</changefreq>
|
|
||||||
<priority>1</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Post::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.posts')}}/{{$lang}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>1</priority>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Gallery::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.galleries')}}/{{$lang}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>2</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Attachment::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.attachments')}}/{{$lang}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>2</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@if(\App\Models\Clip::count() > 0)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{route('client.clips')}}/{{$lang}}</loc>
|
|
||||||
<lastmod>{{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>2</priority>
|
|
||||||
</url>
|
|
||||||
@endif
|
|
||||||
@foreach(\App\Models\Product::where('status',1)->whereLocale('name',$lang)->orderBy('id')->get(['slug','updated_at','name']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{$item->webUrl()}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Post::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{$item->webUrl()}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Clip::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{$item->webUrl()}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Gallery::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{$item->webUrl()}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@foreach(\App\Models\Attachment::where('is_fillable',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>{{$item->webUrl()}}</loc>
|
|
||||||
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>3</priority>
|
|
||||||
</url>
|
|
||||||
@endforeach
|
|
||||||
@endforeach
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</urlset>
|
|
@ -0,0 +1,50 @@
|
|||||||
|
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
||||||
|
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
|
@if(\App\Models\Attachment::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.attachments')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>2</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Attachment::where('is_fillable',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.attachment',$item->slug)}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@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)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.attachments')}}/{{$lang}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>2</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Attachment::where('is_fillable',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{$item->webUrl()}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</urlset>
|
@ -0,0 +1,48 @@
|
|||||||
|
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
||||||
|
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
|
@if(\App\Models\Clip::count() > 0)
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.clips')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>2</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Clip::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.clip',$item->slug)}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@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\Clip::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.clips')}}/{{$lang}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>2</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Clip::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{$item->webUrl()}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</urlset>
|
@ -0,0 +1,50 @@
|
|||||||
|
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
||||||
|
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
|
@if(\App\Models\Gallery::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.galleries')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>2</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Gallery::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.gallery',$item->slug)}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@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\Gallery::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.galleries')}}/{{$lang}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>2</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Gallery::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{$item->webUrl()}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</urlset>
|
@ -0,0 +1,50 @@
|
|||||||
|
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
||||||
|
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
|
@if(\App\Models\Post::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.posts')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>1</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Post::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.post',$item->slug)}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@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)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.posts')}}/{{$lang}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>1</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Post::where('status',1)->whereLocale('title',$lang)->orderBy('id')->get(['slug','updated_at','title']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{$item->webUrl()}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</urlset>
|
@ -0,0 +1,50 @@
|
|||||||
|
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
||||||
|
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
|
@if(\App\Models\Product::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.products')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
<priority>1</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Product::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.product',$item->slug)}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@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\Product::count() > 0)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{route('client.products')}}/{{$lang}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
<priority>1</priority>
|
||||||
|
</url>
|
||||||
|
@endif
|
||||||
|
@foreach(\App\Models\Product::where('status',1)->whereLocale('name',$lang)->orderBy('id')->get(['slug','updated_at','name']) as $item)
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>{{$item->webUrl()}}</loc>
|
||||||
|
<lastmod>{{$item->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
<changefreq>weekly</changefreq>
|
||||||
|
<priority>3</priority>
|
||||||
|
</url>
|
||||||
|
@endforeach
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</urlset>
|
@ -0,0 +1,50 @@
|
|||||||
|
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
|
||||||
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
|
||||||
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
@if(\App\Models\Product::count() > 0)
|
||||||
|
|
||||||
|
<sitemap>
|
||||||
|
<loc>{{route('sitemap.products')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(\App\Models\Post::count() > 0)
|
||||||
|
|
||||||
|
<sitemap>
|
||||||
|
<loc>{{route('sitemap.posts')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(\App\Models\Gallery::count() > 0)
|
||||||
|
|
||||||
|
<sitemap>
|
||||||
|
<loc>{{route('sitemap.galleries')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(\App\Models\Clip::count() > 0)
|
||||||
|
|
||||||
|
<sitemap>
|
||||||
|
<loc>{{route('sitemap.clips')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if(\App\Models\Attachment::count() > 0)
|
||||||
|
|
||||||
|
<sitemap>
|
||||||
|
<loc>{{route('sitemap.attachments')}}</loc>
|
||||||
|
<lastmod>{{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}</lastmod>
|
||||||
|
</sitemap>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</sitemapindex>
|
Loading…
Reference in New Issue