RSS builder for Laravel 5

Maintainers

👁 ricardosierra

Package info

github.com/ricardosierra/rss-l5

pkg:composer/ricardosierra/rss

Statistics

Installs: 332

Dependents: 1

Suggesters: 0

Stars: 1

2.0.1 2020-06-06 01:16 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 1b40f9ba3267aecfe5f2517b793f9e69bfc2076f

  • Ricardo Sierra <contato.woop@ricardosierra.com.br>
  • thujohn <jonathan.thuau.woop@gmail.com>

rsslaravellaravel5

This package is auto-updated.

Last update: 2026-06-06 14:42:56 UTC


README

RSS builder for Laravel 4

👁 Build Status

Installation

Add ricardosierra/rss to composer.json.

"ricardosierra/rss": "~2.0"

Run composer update to pull down the latest version of RSS.

Now open up app/config/app.php and add the service provider to your providers array.

'providers' => array(
 'RicardoSierra\Rss\RssServiceProvider',
)

Now add the alias.

'aliases' => array(
 'Rss' => 'RicardoSierra\Rss\RssFacade',
)

Usage

Returns the feed

Route::get('/', function()
{
	$feed = Rss::feed('2.0', 'UTF-8');
	$feed->channel(array('title' => 'Channel\'s title', 'description' => 'Channel\'s description', 'link' => 'http://www.test.com/'));
	for ($i=1; $i<=5; $i++){
		$feed->item(array('title' => 'Item '.$i, 'description|cdata' => 'Description '.$i, 'link' => 'http://www.test.com/article-'.$i));
	}

	return Response::make($feed, 200, array('Content-Type' => 'text/xml'));
});

Save the feed

Route::get('/', function()
{
	$feed = Rss::feed('2.0', 'UTF-8');
	$feed->channel(array('title' => 'Channel\'s title', 'description' => 'Channel\'s description', 'link' => 'http://www.test.com/'));
	for ($i=1; $i<=5; $i++){
		$feed->item(array('title' => 'Item '.$i, 'description|cdata' => 'Description '.$i, 'link' => 'http://www.test.com/article-'.$i));
	}

	$feed->save('test.xml');
});