forumPosts.blade.php 326 Bytes
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    @foreach ($posts as $post)
        <url>
            <loc>{{ $post->url }}</loc>
            <lastmod>{{ date('c', strtotime($post->lastCommentDate)) }}</lastmod>
        </url>
    @endforeach
</urlset>