rssDetay.blade.php
| 1.7 KB | Satir:
0
| php
Geri
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"> <channel> <title>{{ config('ayarlar.baslik') }}</title> <link>{{ config('ayarlar.siteadresi') }}</link> <description>{{ config('ayarlar.seodesc') }}</description> <language>tr</language> @foreach ($haberler as $haber) @php $text = $haber->metadesc; $detay = $haber->detay; $image = '<p><img class="center" src="' . url('images/haberler/'.$haber->resim) . '" alt="' . $haber->baslik . '"/></p>'; $description = $text; $rssfeed = '<![CDATA[' . $description . ']]>'; $rssdetay = '<![CDATA[' . $haber->embed . $detay . ']]>'; @endphp <item> <title>{{ $haber->baslik }}</title> <category>{{ $haber->haberkat->baslik }}</category> <link>{{ url('haber/'.$haber->slug.'-'.$haber->id) }}</link> <guid>{{ url('haber/'.$haber->slug.'-'.$haber->id) }}</guid> <description>{!! $rssfeed !!}</description> <content:encoded>{!! $rssdetay !!}</content:encoded> <pubDate>{{date('r',strtotime($haber->tarih))}}</pubDate> <enclosure type="image/jpeg" url="{{ url('images/haberler/'.$haber->resim) }}"/> </item> @endforeach </channel> </rss>
Kaydet
Ctrl+S ile kaydet