2017 © Pedro Peláez
 

library larss

RSS builder for Laravel 5

image

hyancat/larss

RSS builder for Laravel 5

  • Sunday, October 30, 2016
  • by HyanCat
  • Repository
  • 2 Watchers
  • 3 Stars
  • 504 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 1 % Grown

The README.md

larss

RSS builder for Laravel 5, (*1)

Installation

  1. Pull down the package with composer:, (*2)

    composer require hyancat/larss
  2. Add the service provider to your providers array in app/config/app.php file., (*3)

    'Hyancat\Larss\LarssServiceProvider'
  3. At last, add the alias to the alias array in app/config/app.php file., (*4)

    'RSS'       => 'Hyancat\Larss\LarssFacade',

Usage

Usage with Cache:


$rss = \RSS::make(); if (! $rss->caching(10)) { // make channel. $rss->channel([ 'title' => 'title', 'description' => 'description', 'link' => 'http://www.xxx.yyy', ])->withImage([ 'url' => 'http://www.xxx.yyy/logo.png', 'title' => 'title', 'link' => 'http://www.xxx.yyy', ]); // gen posts data ...... foreach ($posts as $post) { $rss->item([ 'title' => $post->title, 'description|cdata' => $post->body, 'link' => $post->url, // ...... ]); } } // If you want to save the rss data to file. $rss->save('rss.xml'); // Or just make a response to the http request. return \Response::make($rss->render(), 200, ['Content-Type' => 'text/xml']);

Usage without Cache:


// make with channel. $rss = \RSS::make()->channel([ 'title' => 'title', 'description' => 'description', 'link' => 'http://www.xxx.yyy', // ...... ])->withImage([ 'url' => 'http://www.xxx.yyy/logo.png', 'title' => 'title', 'link' => 'http://www.xxx.yyy', ]); // gen posts data ...... foreach ($posts as $post) { $rss->item([ 'title' => $post->title, 'description|cdata' => $post->body, 'link' => $post->url, // ...... ]); } return ...;

The Versions

30/10 2016

dev-master

9999999-dev

RSS builder for Laravel 5

  Sources   Download

MIT

The Requires

 

30/10 2016

v1.4

1.4.0.0

RSS builder for Laravel 5

  Sources   Download

MIT

The Requires

 

10/06 2015

v1.3

1.3.0.0

RSS builder for Laravel 5

  Sources   Download

MIT

The Requires

 

18/05 2015

v1.2

1.2.0.0

RSS builder for Laravel 5

  Sources   Download

MIT

The Requires

 

17/05 2015

v1.1

1.1.0.0

RSS builder for Laravel 5

  Sources   Download

MIT

The Requires

 

16/05 2015

v1.0

1.0.0.0

RSS builder for Laravel 5

  Sources   Download

MIT

The Requires