New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mayconbordin/rss-l5

RSS builder for Laravel 5
7,432 4
Install
composer require mayconbordin/rss-l5
Latest Version:1.1
PHP:>=5.3.0
Laravel:5
Older releases:4
License:MIT
Last Updated:Jul 8, 2015
Links: GitHub  ·  Packagist
Maintainer: mayconbordin

RSS

RSS builder for Laravel 5

Installation

Add mayconbordin/rss-l5 to composer.json.

"mayconbordin/rss-l5": "~1.1"

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(
    'Thujohn\Rss\RssServiceProvider',
)

Now add the alias.

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

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');
});

Related Packages

hmazter/laravel-log-queue

Laravel 5+ package to push Queued jobs to the log

12,516 5
devfactory/minify

A package for minifying styles and javascript for laravel 5

409,221 82
moell/laravel-rss

Based on moell/rss development laravel version

1,464 11
ajtarragona/tsystems-client

Client per serveis de l'ERP de Tsystems (Tercers, Padró, Vialer)

1,061 0
ricardosierra/minify

A package for minifying styles and javascript for laravel 5

1,003 1

Version History

Version Released PHP Laravel License
1.1 >=5.3.0 5.* MIT
1.0.3 >=5.3.0 4.*|5.* MIT
1.0.2 >=5.3.0 4.*|5.* MIT
1.0.0 >=5.3.0 4.x MIT