• 20-03-2020, 23:59:11
    #1
    Merhaba 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.
    <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>
  • 21-03-2020, 00:39:17
    #2
    Üyeliği durduruldu
    Sayfalama sistemi yapmanız gerekiyor.
  • 21-03-2020, 18:57:15
    #3
    Nasıl yaparım?



    Ben php kod bilmiyorum