ahmed-aliraqi/laravel-rss is a Laravel package for rss builder for laravel 5.
It currently has 0 GitHub stars and 63 downloads on Packagist (latest version v1.0.0).
Install it with composer require ahmed-aliraqi/laravel-rss.
Discover more Laravel packages by ahmed-aliraqi
or browse all Laravel packages to compare alternatives.
Last updated
RSS builder for Laravel 5
composer require ahmed-aliraqi/laravel-rss
Returns the feed
Route::get('/', function()
{
$feed = Rss::feed('2.0', 'UTF-8');
$feed->channel([
'title' => "Channel's title",
'description' => "Channel's description",
'link' => "http://www.test.com/"
]);
for ($i=1; $i<=5; $i++) {
$feed->item([
'title' => 'Item '.$i,
'description|cdata' => 'Description '.$i,
'link' => 'http://www.test.com/article-'.$i
]);
}
return response($feed, 200)->header('Content-Type', 'text/xml');
});
Save the feed
Route::get('/', function()
{
$feed = Rss::feed('2.0', 'UTF-8');
$feed->channel([
'title' => "Channel's title",
'description' => "Channel's description",
'link' => "http://www.test.com/"
]);
for ($i=1; $i<=5; $i++) {
$feed->item([
'title' => 'Item '.$i,
'description|cdata' => 'Description '.$i,
'link' => 'http://www.test.com/article-'.$i
]);
}
$feed->save('test.xml');
});