<?=
'<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL
?>
<rss version="2.0">
    <channel>
        <title>RSS {{$setting['web_title']}}</title>
        <link>{{ url('') }}></link>
        <description>RSS {{$setting['web_title']}}></description>
        <language>{{ $setting['default_language'] }}</language>
        <copyright>{{$setting['web_title']}}</copyright>
        <lastBuildDate>{{ now() }}</lastBuildDate>
        <generator>feed_domain ({{ $setting['email'] }})</generator>

        @foreach($posts as $post)
            <item>
                <id>{{ $post->id }}</id>
                <title>{{ $post->title }}</title>
                <description>{{ strip_tags(($post->content)) }}</description>
                <link>{{ url('post/'.$post['slug'])}}</link>
                <pubDate>{{ $post->post_date }}</pubDate>
                <image>{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $post->thumbnail }}</image>
                <guid isPermaLink="false">{{ url('post/'.$post['slug']) }}</guid>
                <kategori>{{ $post->rCategory->name  }}</kategori>
                <views>{{ $post->viewer }}</views>
            </item>
        @endforeach
    </channel>
</rss>
