added langs to sitemap

main
A1Gard 3 months ago
parent f1813205e8
commit d1c9c4140e

@ -9,4 +9,15 @@
<priority>0.8</priority>
</url>
@endforeach
@if(config('app.xlang'))
@foreach(\App\Models\Xlang::where('is_default', 0)->get() as $lang)
<url>
<loc>{{route('lang.product-category.show',[$lang->tag,$item->slug])}}</loc>
<lastmod>{{ $item->updated_at->tz('UTC')->toAtomString() }}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
@endforeach
@endif
@endsection

@ -7,7 +7,6 @@
<priority>1</priority>
</url>
@foreach($items as $item)
<url>
<loc>{{route('post.show',$item->slug)}}</loc>
<lastmod>{{ $item->updated_at->tz('UTC')->toAtomString() }}</lastmod>
@ -15,4 +14,14 @@
<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
@endsection

@ -15,4 +15,14 @@
<priority>0.8</priority>
</url>
@endforeach
@if(config('app.xlang'))
@foreach(\App\Models\Xlang::where('is_default', 0)->get() as $lang)
<url>
<loc>{{route('lang.product',[$lang->tag,$item->slug])}}</loc>
<lastmod>{{ $item->updated_at->tz('UTC')->toAtomString() }}</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
@endforeach
@endif
@endsection

@ -189,6 +189,13 @@ Route::prefix(config('starter-kit.uri'))->name('admin.')->group(
}
);
});
// site map
Route::get('/sitemap.xml', [App\Http\Controllers\SitemapController::class, 'index'])->name('sitemap.index');
Route::get('/sitemap/posts.xml', [App\Http\Controllers\SitemapController::class, 'posts'])->name('sitemap.posts');
Route::get('/sitemap/cats.xml', [App\Http\Controllers\SitemapController::class, 'cats'])->name('sitemap.cats');
Route::get('/sitemap/products.xml', [App\Http\Controllers\SitemapController::class, 'products'])->name('sitemap.products');
Route::get('/props/list/{id}', [\App\Http\Controllers\Admin\PropController::class, 'list'])->name('props.list');
// for under construction
@ -340,12 +347,6 @@ Route::prefix('/{lang?}')->name('lang.')->group(function () {
});
// site map
Route::get('/sitemap.xml', [App\Http\Controllers\SitemapController::class, 'index'])->name('sitemap.index');
Route::get('/sitemap/posts.xml', [App\Http\Controllers\SitemapController::class, 'posts'])->name('sitemap.posts');
Route::get('/sitemap/cats.xml', [App\Http\Controllers\SitemapController::class, 'cats'])->name('sitemap.cats');
Route::get('/sitemap/products.xml', [App\Http\Controllers\SitemapController::class, 'products'])->name('sitemap.products');
//Route::get('impex/customer', [App\Http\Controllers\ImpexController::class, 'customer'])->name('impex.customer');
//Route::get('impex/col', [App\Http\Controllers\ImpexController::class, 'col'])->name('impex.col');
//Route::get('impex/crwl', [App\Http\Controllers\ImpexController::class, 'crwl'])->name('impex.crwl');

Loading…
Cancel
Save