Skip to content

Instantly share code, notes, and snippets.

@jurosh
Last active September 11, 2023 20:44
Show Gist options
  • Save jurosh/76e68e64ff3f92b521e019769a258181 to your computer and use it in GitHub Desktop.
Save jurosh/76e68e64ff3f92b521e019769a258181 to your computer and use it in GitHub Desktop.
base.blade.php
<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; ?>
<?php echo '<?xml-stylesheet type="text/xsl" href="'.url('sitemap.xsl').'" ?>' ?>
<!-- generated-on="{{ date('m/d/Y h:i:s a', time()) }}" -->
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{ url('/') }}</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>{{ url('videa') }}</loc>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
@foreach($posts as $post)
<url>
<loc>{{ url('clanok/'.$post->post_name) }}</loc>
<priority>1.0</priority>
<?php /*
<!-- TODO correct format 2014-07-24T16:47:47+00:00
<lastmod></lastmod>
TODO <changefreq>daily</changefreq>
TODO <priority>1.0</priority>
-->
*/?>
</url>
@endforeach
....
.....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment