...
 
Commits (29)
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
/nbproject
/vendor
composer.phar
composer.lock
.directory
.DS_Store
Thumbs.db
*.sh
\ No newline at end of file
/vendor
composer.phar
composer.lock
.directory
.DS_Store
Thumbs.db
*.sh
/tests/tmp
.php_cs
/.php_cs.cache
image: php:7.1
before_script:
# update os
- apt-get update -yqq
# install missing packages
- apt-get install wget git zip unzip -yqq
# install composer.phar
- curl -sS https://getcomposer.org/installer | php
# install xdebug
- pecl install xdebug
# enable xdebug
- docker-php-ext-enable xdebug
# run composer install
- php composer.phar install
# test php 7.0
test:php7.0:
image: php:7.0
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
allow_failure: false
# test php 7.1
test:php7.1:
image: php:7.1
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
allow_failure: false
# test php 7.2
test:php7.2:
image: php:7.2
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
allow_failure: false
\ No newline at end of file
preset: psr-2
risky: true
\ No newline at end of file
language: php
php:
- 7.0
- 7.1
- 7.2
sudo: false
branches:
only:
- master
before_script:
- composer self-update
- composer install
script:
- vendor/bin/phpunit
# Change log
## v2.11.3 (2018-09-05)
### Changed
- Package name changed from ``roumen/feed`` to ``laravelium/feed`` ([new packagist repo](https://packagist.org/packages/laravelium/feed))
### Added
- Added new [packagist repo](https://packagist.org/packages/laravelium/feed)
- Added new branch for development ``2.11.x-dev``
- Added new [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) testing with code coverage
- Added new coding style testing with [StyleCI](https://gitlab.styleci.io/repos/8088383)
- Added release changelog
- Added contributing guidelines
### Fixed
- Minor bug fixes and optimizations
\ No newline at end of file
# Change log
## v2.12.2 (2018-09-05)
### Changed
- Package name changed from ``roumen/feed`` to ``laravelium/feed`` ([new packagist repo](https://packagist.org/packages/laravelium/feed))
### Added
- Added new [packagist repo](https://packagist.org/packages/laravelium/feed)
- Added new branch for development ``2.12.x-dev``
- Added new [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) testing with code coverage
- Added new coding style testing with [StyleCI](https://gitlab.styleci.io/repos/8088383)
- Added release changelog
- Added contributing guidelines
### Fixed
- Minor bug fixes and optimizations
# Change log
## v3.0.1 (2018-09-05)
### Changed
- Package name changed from ``roumen/feed`` to ``laravelium/feed`` ([new packagist repo](https://packagist.org/packages/laravelium/feed))
### Added
- Added new [packagist repo](https://packagist.org/packages/laravelium/feed)
- Added new branch for development ``3.0.x-dev``
- Added new [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) testing with code coverage
- Added new coding style testing with [StyleCI](https://gitlab.styleci.io/repos/8088383)
- Added release changelog
- Added contributing guidelines
- Added support for Laravel 5.7
### Fixed
- Minor bug fixes and optimizations
# Contribution Guide
## New Merge Requests
- Your commits must be **Verified**
- Your **Code Coverage** must be **100%**
- Your tests ([*GitLab CI/CD*](https://docs.gitlab.com/ee/ci/)) must be with **Passing** status (**no broken tests!**)
- Your **Coding Style** must be valid [*PSR-2*](https://www.php-fig.org/psr/psr-2/) (*use this:* [*php-cs-fixer config*](https://gitlab.com/snippets/1749141))
## New Issues
There is no special template for creating new issues, but please when create new one describe your issue and provide enough information about it : error logs, screen shots, state what version of the package you are using, what version of laravel (laravel based cms) etc.
## Security Reports
If you discover a security vulnerability within this package, please send an e-mail to Roumen Damianoff via [roumen@laravelium.com](mailto:roumen@laravelium.com). All security vulnerabilities will be promptly addressed.
MIT License
Copyright (c) <2012-2017> <Roumen Damianoff> <roumen@crimsson.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Developer’s Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
\ No newline at end of file
MIT License
Copyright (c) Roumen Damianoff <roumen@damianoff.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Developer’s Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
\ No newline at end of file
# [laravel-feed](https://damianoff.com/en/projects/laravel-feed)
# **[Laravelium Feed](https://laravelium.com) package**
[![Latest Stable Version](https://poser.pugx.org/roumen/feed/version.png)](https://packagist.org/packages/roumen/feed) [![Total Downloads](https://poser.pugx.org/roumen/feed/d/total.png)](https://packagist.org/packages/roumen/feed) [![Build Status](https://travis-ci.org/Laravelium/laravel-feed.png?branch=master)](https://travis-ci.org/Laravelium/laravel-feed) [![License](https://poser.pugx.org/roumen/feed/license.png)](https://packagist.org/packages/roumen/feed)
A simple feed generator for Laravel 5.
*Laravelium Feed package for Laravel.*
## Notes
Branch dev-master is for development and is UNSTABLE
- Dev branches are for development and are **UNSTABLE** (*use on your own risk*)!
## Installation
Run the following command and provide the latest stable version (e.g v2.11.2) :
Run the following command and provide the latest stable version (e.g v3.0.\*) :
```bash
composer require roumen/feed
composer require laravelium/feed
```
or add the following to your `composer.json` file :
#### For Laravel 5.7
```json
"roumen/feed": "~2.11.2"
"laravelium/feed": "3.0.*"
```
Then register this service provider with Laravel :
```php
Roumen\Feed\FeedServiceProvider::class,
(development branch)
```json
"laravelium/feed": "3.0.x-dev"
```
and add class alias :
#### For Laravel 5.6
```json
"laravelium/feed": "2.12.*"
```
(development branch)
```json
"laravelium/feed": "2.12.x-dev"
```
```php
'Feed' => Roumen\Feed\Feed::class,
#### For Laravel 5.5
```json
"laravelium/feed": "2.11.*"
```
(development branch)
```json
"laravelium/feed": "2.11.x-dev"
```
Publish package views (OPTIONAL) :
```bash
php artisan vendor:publish --provider="Roumen\Feed\FeedServiceProvider"
php artisan vendor:publish --provider="Laravelium\Feed\FeedServiceProvider"
```
## Examples
[How to generate basic feed (with optional caching)](https://github.com/Laravelium/laravel-feed/wiki/basic-feed)
[How to generate basic feed (with optional caching)](https://gitlab.com/Laravelium/Feed/wikis/basic-feed)
[How to generate multiple feeds](https://gitlab.com/Laravelium/Feed/wikis/multiple-feeds)
[How to add images to your feed](https://gitlab.com/Laravelium/Feed/wikis/How-to-add-images-to-your-feed)
[How to use custom view for your feed](https://gitlab.com/Laravelium/Feed/wikis/How-to-use-custom-view)
[How to use custom content-type for your feed](https://gitlab.com/Laravelium/Feed/wikis/How-to-use-custom-content-type)
[How to generate multiple feeds](https://github.com/Laravelium/laravel-feed/wiki/multiple-feeds)
and more in the [Wiki](https://gitlab.com/Laravelium/Feed/wikis)
[How to add images to your feed](https://github.com/Laravelium/laravel-feed/wiki/How-to-add-images-to-your-feed)
## Contribution guidelines
[How to use custom view for your feed](https://github.com/Laravelium/laravel-feed/wiki/How-to-use-custom-view)
Before submiting new merge request or creating new issue, please read [contribution guidelines](https://gitlab.com/Laravelium/Feed/blob/master/CONTRIBUTING.md).
[How to use custom content-type for your feed](https://github.com/Laravelium/laravel-feed/wiki/How-to-use-custom-content-type)
## License
and more in the [Wiki](https://github.com/Laravelium/laravel-feed/wiki)
This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
{
"name": "roumen/feed",
"description": "A simple feed generator for Laravel.",
"homepage": "https://damianoff.com/en/projects/laravel-feed",
"keywords": ["laravel", "feed", "generator", "rss", "atom"],
"name": "laravelium/feed",
"description": "Laravelium Feed generator for Laravel.",
"homepage": "https://laravelium.com",
"keywords": ["laravelium", "laravel", "feed", "generator", "rss", "atom"],
"license": "MIT",
"authors": [
{
"name": "Roumen Damianoff",
"email": "roumen@crimsson.com",
"email": "roumen@damianoff.com",
"role": "Developer",
"homepage": "https://damianoff.com"
}
......@@ -17,22 +17,23 @@
"illuminate/support": "5.5.*"
},
"require-dev": {
"phpunit/phpunit": "~5.4"
"phpunit/phpunit": "~6.0",
"orchestra/testbench": "3.5.*"
},
"autoload": {
"psr-0": {
"Roumen\\Feed": "src/"
"Laravelium\\Feed": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Roumen\\Feed\\FeedServiceProvider"
"Laravelium\\Feed\\FeedServiceProvider"
],
"aliases": {
"Feed": "Roumen\\Feed\\Feed"
"Feed": "Laravelium\\Feed\\Feed"
}
}
},
"minimum-stability": "stable"
"minimum-stability": "dev"
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="Feed Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/Laravelium/Feed/</directory>
<exclude>
<directory>./tests/</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
\ No newline at end of file
This diff is collapsed.
<?php namespace Laravelium\Feed;
use Illuminate\Support\ServiceProvider;
use Laravelium\Feed\Feed;
class FeedServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = true;
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->loadViewsFrom(__DIR__ . '/../../views', 'feed');
$this->publishes([
__DIR__ . '/../../views' => base_path('resources/views/vendor/feed')
], 'views');
$config_file = __DIR__ . '/../../config/config.php';
$this->mergeConfigFrom($config_file, 'feed');
$this->publishes([
$config_file => config_path('feed.php')
], 'config');
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->bind('feed', function ($app) {
$config = config('feed');
return new Feed(
$config,
$app['Illuminate\Cache\Repository'],
$app['config'],
$app['files'],
$app['Illuminate\Contracts\Routing\ResponseFactory'],
$app['view']
);
});
$this->app->alias('feed', Feed::class);
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return ['feed', Feed::class];
}
}
This diff is collapsed.
<?php namespace Roumen\Feed;
use Illuminate\Support\ServiceProvider;
class FeedServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->loadViewsFrom(__DIR__ . '/../../views', 'feed');
$this->publishes([
__DIR__ . '/../../views' => base_path('resources/views/vendor/feed')
], 'views');
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app->bind('feed', function()
{
return new Feed();
});
$this->app->alias('feed', 'Roumen\Feed\Feed');
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return ['feed'];
}
}
\ No newline at end of file
<?php
/* Simple configuration file for Laravel Sitemap package */
return [
'use_cache' => false,
'cache_key' => 'laravel-feed.' . config('app.url'),
'cache_duration' => 3600,
'escaping' => true,
'use_limit_size' => false,
'max_size' => null,
'use_styles' => true,
'styles_location' => null,
];
{!! '<'.'?'.'xml version="1.0" encoding="UTF-8" ?>' !!}
<feed xmlns="http://www.w3.org/2005/Atom"<?php foreach($namespaces as $n) echo " ".$n; ?>>
<title type="text">{!! $channel['title'] !!}</title>
<subtitle type="html"><![CDATA[{!! $channel['description'] !!}]]></subtitle>
<link href="{{ $channel['rssLink'] }}"></link>
<id>{{ $channel['link'] }}</id>
<link rel="alternate" type="text/html" href="{{ $channel['rssLink'] }}" ></link>
<link rel="{{ $channel['ref'] }}" type="application/atom+xml" href="{{ $channel['link'] }}" ></link>
<feed xmlns="http://www.w3.org/2005/Atom"<?php foreach ($namespaces as $n) {
echo " ".$n;
} ?>>
<title type="text">{!! $channel['title'] !!}</title>
<subtitle type="html"><![CDATA[{!! $channel['description'] !!}]]></subtitle>
<link href="{{ $channel['rssLink'] }}"></link>
<id>{{ $channel['link'] }}</id>
<link rel="alternate" type="text/html" href="{{ $channel['rssLink'] }}" ></link>
<link rel="{{ $channel['ref'] }}" type="application/atom+xml" href="{{ $channel['link'] }}" ></link>
@if (!empty($channel['logo']))
<logo>{{ $channel['logo'] }}</logo>
<logo>{{ $channel['logo'] }}</logo>
@endif
@if (!empty($channel['icon']))
<icon>{{ $channel['icon'] }}</icon>
<icon>{{ $channel['icon'] }}</icon>
@endif
<updated>{{ $channel['pubdate'] }}</updated>
<updated>{{ $channel['pubdate'] }}</updated>
@foreach($items as $item)
<entry>
<author>
<name>{{ $item['author'] }}</name>
</author>
<title type="text"><![CDATA[{!! $item['title'] !!}]]></title>
<link rel="alternate" type="text/html" href="{{ $item['link'] }}"></link>
<id>{{ $item['link'] }}</id>
<summary type="html"><![CDATA[{!! $item['description'] !!}]]></summary>
<content type="html"><![CDATA[{!! $item['content'] !!}]]></content>
<updated>{{ $item['pubdate'] }}</updated>
</entry>
<entry>
<author>
<name>{{ $item['author'] }}</name>
</author>
<title type="text"><![CDATA[{!! $item['title'] !!}]]></title>
<link rel="alternate" type="text/html" href="{{ $item['link'] }}"></link>
<id>{{ $item['link'] }}</id>
<summary type="html"><![CDATA[{!! $item['description'] !!}]]></summary>
<content type="html"><![CDATA[{!! $item['content'] !!}]]></content>
<updated>{{ $item['pubdate'] }}</updated>
</entry>
@endforeach
</feed>
{!! '<'.'?'.'xml version="1.0" encoding="UTF-8" ?>' !!}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0" xmlns:media="http://search.yahoo.com/mrss/"<?php foreach($namespaces as $n) echo " ".$n; ?>>
<channel>
<title>{!! $channel['title'] !!}</title>
<link>{{ $channel['rssLink'] }}</link>
<description><![CDATA[{!! $channel['description'] !!}]]></description>
<atom:link href="{{ $channel['link'] }}" rel="{{ $channel['ref'] }}" type="application/rss+xml" />
@if (!empty($channel['copyright']))
<copyright>{{ $channel['copyright'] }}</copyright>
@endif
@if (!empty($channel['color']))
<webfeeds:accentColor>{{ $channel['color'] }}</webfeeds:accentColor>
@endif
@if (!empty($channel['cover']))
<webfeeds:cover image="{{ $channel['cover'] }}" />
@endif
@if (!empty($channel['icon']))
<webfeeds:icon>{{ $channel['icon'] }}</webfeeds:icon>
@endif
@if (!empty($channel['logo']))
<webfeeds:logo>{{ $channel['logo'] }}</webfeeds:logo>
<image>
<url>{{ $channel['logo'] }}</url>
<title>{{ $channel['title'] }}</title>
<link>{{ $channel['rssLink'] }}</link>
</image>
@endif
@if (!empty($channel['related']))
<webfeeds:related layout="card" target="browser" />
@endif
@if (!empty($channel['ga']))
<webfeeds:analytics id="{{ $channel['ga'] }}" engine="GoogleAnalytics" />
@endif
<language>{{ $channel['lang'] }}</language>
<lastBuildDate>{{ $channel['pubdate'] }}</lastBuildDate>
@foreach($items as $item)
<item>
<title><![CDATA[{!! $item['title'] !!}]]></title>
@if (!empty($item['category']))
<category>{{ $item['category'] }}</category>
@endif
<link>{{ $item['link'] }}</link>
<guid isPermaLink="true">{{ $item['link'] }}</guid>
<description><![CDATA[{!! $item['description'] !!}]]></description>
@if (!empty($item['content']))
<content:encoded><![CDATA[{!! $item['content'] !!}]]></content:encoded>
@endif
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">{!! $item['author'] !!}</dc:creator>
<pubDate>{{ $item['pubdate'] }}</pubDate>
@if (!empty($item['enclosure']))
<enclosure
@foreach ($item['enclosure'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
/>
@endif
@if (!empty($item['media:content']))
<media:content
@foreach ($item['media:content'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
/>
@endif
@if (!empty($item['media:thumbnail']))
<media:thumbnail
@foreach ($item['media:thumbnail'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
/>
@endif
@if (!empty($item['media:title']))
<media:title type="plain">{{ $item['media:title'] }}</media:title>
@endif
@if (!empty($item['media:description']))
<media:description type="plain">{{ $item['media:description'] }}</media:description>
@endif
@if (!empty($item['media:keywords']))
<media:keywords>{{ $item['media:title'] }}</media:keywords>
@endif
@if (!empty($item['media:rating']))
<media:rating>{{ $item['media:rating'] }}</media:rating>
@endif
@if (!empty($item['creativeCommons:license']))
<creativeCommons:license>{{ $item['creativeCommons:license'] }}</creativeCommons:license>
@endif
</item>
@endforeach
</channel>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0" xmlns:media="http://search.yahoo.com/mrss/"<?php foreach ($namespaces as $n) {
echo " ".$n;
} ?>>
<channel>
<title>{!! $channel['title'] !!}</title>
<link>{{ $channel['rssLink'] }}</link>
<description><![CDATA[{!! $channel['description'] !!}]]></description>
<atom:link href="{{ $channel['link'] }}" rel="{{ $channel['ref'] }}" type="application/rss+xml" />
@if (!empty($channel['copyright']))
<copyright>{{ $channel['copyright'] }}</copyright>
@endif
@if (!empty($channel['color']))
<webfeeds:accentColor>{{ $channel['color'] }}</webfeeds:accentColor>
@endif
@if (!empty($channel['cover']))
<webfeeds:cover image="{{ $channel['cover'] }}" />
@endif
@if (!empty($channel['icon']))
<webfeeds:icon>{{ $channel['icon'] }}</webfeeds:icon>
@endif
@if (!empty($channel['logo']))
<webfeeds:logo>{{ $channel['logo'] }}</webfeeds:logo>
<image>
<url>{{ $channel['logo'] }}</url>
<title>{{ $channel['title'] }}</title>
<link>{{ $channel['rssLink'] }}</link>
</image>
@endif
@if (!empty($channel['related']))
<webfeeds:related layout="card" target="browser" />
@endif
@if (!empty($channel['ga']))
<webfeeds:analytics id="{{ $channel['ga'] }}" engine="GoogleAnalytics" />
@endif
<language>{{ $channel['lang'] }}</language>
<lastBuildDate>{{ $channel['pubdate'] }}</lastBuildDate>
@foreach($items as $item)
<item>
<title><![CDATA[{!! $item['title'] !!}]]></title>
@if (!empty($item['category']))
<category>{{ $item['category'] }}</category>
@endif
<link>{{ $item['link'] }}</link>
<guid isPermaLink="true">{{ $item['link'] }}</guid>
<description><![CDATA[{!! $item['description'] !!}]]></description>
@if (!empty($item['content']))
<content:encoded><![CDATA[{!! $item['content'] !!}]]></content:encoded>
@endif
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">{!! $item['author'] !!}</dc:creator>
<pubDate>{{ $item['pubdate'] }}</pubDate>
@if (!empty($item['enclosure']))
<enclosure
@foreach ($item['enclosure'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
/>
@endif
@if (!empty($item['media:content']))
<media:content
@foreach ($item['media:content'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
/>
@endif
@if (!empty($item['media:thumbnail']))
<media:thumbnail
@foreach ($item['media:thumbnail'] as $k => $v)
{!! $k.'="'.$v.'" ' !!}
@endforeach
/>
@endif
@if (!empty($item['media:title']))
<media:title type="plain">{{ $item['media:title'] }}</media:title>
@endif
@if (!empty($item['media:description']))
<media:description type="plain">{{ $item['media:description'] }}</media:description>
@endif
@if (!empty($item['media:keywords']))
<media:keywords>{{ $item['media:title'] }}</media:keywords>
@endif
@if (!empty($item['media:rating']))
<media:rating>{{ $item['media:rating'] }}</media:rating>
@endif
@if (!empty($item['creativeCommons:license']))
<creativeCommons:license>{{ $item['creativeCommons:license'] }}</creativeCommons:license>
@endif
</item>
@endforeach
</channel>
</rss>
This diff is collapsed.