diff --git a/resources/views/website/sitemap.blade.php b/resources/views/website/sitemap.blade.php index 00e2af8..57bb88e 100644 --- a/resources/views/website/sitemap.blade.php +++ b/resources/views/website/sitemap.blade.php @@ -1,4 +1,4 @@ - + @if(\App\Models\Product::count() > 0) @@ -93,97 +93,99 @@ @endforeach @if(config('app.xlang.active')) @foreach(\App\Models\XLang::where('is_default',0)->pluck('tag')->toArray() as $lang) -{{-- WIP multi lang --}} -{{-- @if(\App\Models\Product::count() > 0)--}} - -{{-- --}} -{{-- {{route('client.products')}}--}} -{{-- {{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- daily--}} -{{-- 1--}} -{{-- --}} -{{-- @endif--}} -{{-- @if(\App\Models\Post::count() > 0)--}} - -{{-- --}} -{{-- {{route('client.posts')}}--}} -{{-- {{\App\Models\Post::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 1--}} -{{-- --}} -{{-- @endif--}} -{{-- @if(\App\Models\Gallery::count() > 0)--}} - -{{-- --}} -{{-- {{route('client.galleries')}}--}} -{{-- {{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 2--}} -{{-- --}} -{{-- @endif--}} -{{-- @if(\App\Models\Attachment::count() > 0)--}} - -{{-- --}} -{{-- {{route('client.attachments')}}--}} -{{-- {{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 2--}} -{{-- --}} -{{-- @endif--}} -{{-- @if(\App\Models\Clip::count() > 0)--}} - -{{-- --}} -{{-- {{route('client.clips')}}--}} -{{-- {{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 2--}} -{{-- --}} -{{-- @endif--}} -{{-- @foreach(\App\Models\Product::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)--}} - -{{-- --}} -{{-- {{route('client.product',$item->slug)}}--}} -{{-- {{$item->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 3--}} -{{-- --}} -{{-- @endforeach--}} -{{-- @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--}} -{{-- @foreach(\App\Models\Clip::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)--}} - -{{-- --}} -{{-- {{route('client.clip',$item->slug)}}--}} -{{-- {{$item->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 3--}} -{{-- --}} -{{-- @endforeach--}} -{{-- @foreach(\App\Models\Gallery::where('status',1)->orderBy('id')->get(['slug','updated_at']) as $item)--}} - -{{-- --}} -{{-- {{route('client.gallery',$item->slug)}}--}} -{{-- {{$item->updated_at->tz('UTC')->toAtomString()}}--}} -{{-- weekly--}} -{{-- 3--}} -{{-- --}} -{{-- @endforeach--}} -{{-- @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--}} -{{-- 3--}} -{{-- --}} -{{-- @endforeach--}} + + @php(app()->setLocale($lang)) + @if(\App\Models\Product::count() > 0) + + + {{route('client.products')}}/{{$lang}} + {{\App\Models\Product::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} + daily + 1 + + @endif + @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 + @if(\App\Models\Gallery::count() > 0) + + + {{route('client.galleries')}}/{{$lang}} + {{\App\Models\Gallery::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} + weekly + 2 + + @endif + @if(\App\Models\Attachment::count() > 0) + + + {{route('client.attachments')}}/{{$lang}} + {{\App\Models\Attachment::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} + weekly + 2 + + @endif + @if(\App\Models\Clip::count() > 0) + + + {{route('client.clips')}}/{{$lang}} + {{\App\Models\Clip::orderByDesc('updated_at')->first()->updated_at->tz('UTC')->toAtomString()}} + weekly + 2 + + @endif + @foreach(\App\Models\Product::where('status',1)->whereLocale('name',$lang)->orderBy('id')->get(['slug','updated_at','name']) as $item) + + + {{$item->webUrl()}} + {{$item->updated_at->tz('UTC')->toAtomString()}} + weekly + 3 + + @endforeach + @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 + @foreach(\App\Models\Clip::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 + @foreach(\App\Models\Gallery::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 + @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 + 3 + + @endforeach @endforeach @endif