rssMakale.blade.php
| 1.8 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 ($makaleler as $makale) @php $text = $makale->baslik; $detay = $makale->detay; $description = $text; $rssfeed = '<![CDATA[' . $description . ']]>'; $rssdetay = '<![CDATA[' . $detay . ']]>'; @endphp <item> <title>{{ $makale->baslik }}</title> <category>{{ $makale->makaleyazar->name }}</category> <link>{{ url('makale/'.Illuminate\Support\Str::slug($makale->baslik).'-'.$makale->id) }}</link> <author>{{ $makale->makaleyazar->email }} ({{ $makale->makaleyazar->name }})</author> <guid>{{ url('makale/'.Illuminate\Support\Str::slug($makale->baslik).'-'.$makale->id) }}</guid> <description>{!! $rssfeed !!}</description> <content:encoded>{!! $rssdetay !!}</content:encoded> <pubDate>{{date('r',strtotime($makale->tarih))}}</pubDate> <enclosure type="image/jpeg" url="{{ url('images/kullanicilar/'.$makale->makaleyazar->photo) }}"/> </item> @endforeach </channel> </rss>
Kaydet
Ctrl+S ile kaydet