<?php use Carbon\Carbon; ?>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="{{ url('/') }}/main-sitemap.xsl"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
    xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
    xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
    <?php if(!empty($links)){ ?>
    @foreach ($links as $link)
        <url>
            <loc>{{ $link }}</loc>
            <lastmod>{{ Carbon::yesterday() }}</lastmod>
            <changefreq>daily</changefreq>
            <priority>0.9</priority>
        </url>
    @endforeach
    <?php } ?>
</urlset>
