Initial commit
This commit is contained in:
22
resources/views/sitemap/news.blade.php
Normal file
22
resources/views/sitemap/news.blade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
||||
@if (count($news) > 0)
|
||||
@foreach ($news as $new)
|
||||
<url>
|
||||
<loc>{{ route('detail', ['slug' => $new->slug]).'/' }}</loc>
|
||||
<lastmod>{{ $new->updated_at->setTimezone('Asia/Tehran')->toAtomString() }}</lastmod>
|
||||
<changefreq>{{ !is_null($new->changefreq) ? $new->changefreq : 'never' }}</changefreq>
|
||||
<image:image>
|
||||
<image:loc>{{ env('APP_URL_IMAGE').'images/'.$new->image }}</image:loc>
|
||||
</image:image>
|
||||
@if (isset($blogImages[$new->id]))
|
||||
@foreach ($blogImages[$new->id] as $imageUrl)
|
||||
<image:image>
|
||||
<image:loc>{{ $imageUrl }}</image:loc>
|
||||
</image:image>
|
||||
@endforeach
|
||||
@endif
|
||||
</url>
|
||||
@endforeach
|
||||
@endif
|
||||
</urlset>
|
||||
Reference in New Issue
Block a user