<url>
<loc>{{ url('/') }}</loc>
<lastmod>{{$date}}</lastmod>
<priority>0.8</priority>
</url>
@foreach( App\Models\Pages::all() as $page )
<url>
<loc>{{ url('sayfa',$page->slug) }}</loc>
<lastmod>{{$date}}</lastmod>
<priority>0.8</priority>
</url>
@endforeach
@foreach( App\Models\User::where('status','active')->get() as $user )
<url>
<loc>{{ url($user->username) }}</loc>
<lastmod>{{$date}}</lastmod>
<priority>0.8</priority>
</url>
@endforeach
@foreach( App\Models\Images::where('status','active')->get() as $response )
<?php if( str_slug( $response->title ) == '' ) {
$slugUrl = '';
} else {
$slugUrl = '/'.str_slug( $response->title );
} ?>
<url>
<loc>{{ url('resim',$response->id).$slugUrl }}</loc>
<lastmod>{{ date('Y-m-d', strtotime($response->date) ) }}</lastmod>
<priority>0.8</priority>
</url>
@endforeach
@foreach( App\Models\Categories::where('mode','on')->get() as $response )
<?php if( str_slug( $response->title ) == '' ) {
$slugUrl = '';
} else {
$slugUrl = '/'. $response->slug;
} ?>
<url>
<loc>{{ url('kategori' . $slugUrl) }}</loc>
<lastmod>{{$date}}</lastmod>
<priority>0.8</priority>
</url>
@endforeach
</urlset> Sitemap haritasını parçalara bölmem gerekiyor
2
●60
- 20-03-2020, 23:59:11Merhaba sitemap haritasını parçalara bölmem lazım. Bunu nasıl yaparım. Site laravel altyapısına sahiptir. Aşağıya kodu bırakıyorum yardımcı olabilecek varsa sevinirim. Sitede toplamda 200 k link var nerdeyse. Yardımınız için teşekkür ederim.