ahmed-aliraqi / laravel-rss
RSS builder for Laravel 5
Installs: 63
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ahmed-aliraqi/laravel-rss
Requires
- php: >=5.3.0
- illuminate/support: 5.*
This package is auto-updated.
Last update: 2025-09-29 01:59:32 UTC
README
RSS builder for Laravel 5
Installation
composer require ahmed-aliraqi/laravel-rss
Usage
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'); });