feed.new.blade.php 1.38 KB
Newer Older
Triyah Fatmawati committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<?=
'<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL
?>
<rss version="2.0">
    <channel>
        <title><![CDATA[ RSS {{$setting['web_title']}}]]></title>
        <link><![CDATA[ {{ url('') }}]]></link>
        <description><![CDATA[ BERITA {{$setting['web_title']}} ]]></description>
        <language>en</language>
        <pubDate>{{ now() }}</pubDate>
        @foreach($posts as $post)
          {{-- <image>
                <url>{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $post->thumbnail }}</url>                
            </image>--}}
            <item>
                <title>{{ $post->title }}</title>
                <image>
                <url>{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $post->thumbnail }}</url>                
            </image>
                <link>{{ url('post/'.$post['slug'])}}</link>
                <description>{!! strip_tags(substr(html_entity_decode($post->content,ENT_COMPAT,"UTF-8"),0 , 250)) !!}</description>
              {{--  <description><![CDATA[{!! $post->content !!}]]></description>--}}
                <category>{{ $post->rCategory->name  }}</category>
               {{-- <author><![CDATA[{{ $post->slug  }}]]></author>--}}
              {{--  <guid>{{ $post->id }}</guid>--}}
                <pubDate>{{ $post->post_date }}</pubDate>
            </item>
        @endforeach
    </channel>
</rss>