2017 © Pedro Peláez
 

library laravel-feed-reader

A simple RSS feed reader for Laravel 5

image

vedmant/laravel-feed-reader

A simple RSS feed reader for Laravel 5

  • Saturday, November 7, 2015
  • by vedmant
  • Repository
  • 1 Watchers
  • 4 Stars
  • 842 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 16 Forks
  • 0 Open issues
  • 7 Versions
  • 28 % Grown

The README.md

Laravel Feed Reader

Latest Version on Packagist Software License Total Downloads Build Status, (*1)

A simple RSS feed reader for Laravel, (*2)

Features

  • One command to read any RSS feed
  • Different RSS feed profiles enabled

Quick Start

To install this package run the Composer command, (*3)

$ composer require vedmant/laravel-feed-reader

Video Tutorial

, (*4)

For Laravel 5.5 and above this package supports Laravel Auto-Discovery and will be discovered automatically., (*5)

For Laravel versions prior to 5.5 follow next guide:, (*6)

In your config/app.php add following:, (*7)

'providers' => [

    Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
    Illuminate\Auth\AuthServiceProvider::class,
    ...
    Vedmant\FeedReader\FeedReaderServiceProvider::class, // Add this line

[,

'aliases' => [

    'App'        => Illuminate\Support\Facades\App::class,
    'Artisan'    => Illuminate\Support\Facades\Artisan::class,
    ...
    'FeedReader' => Vedmant\FeedReader\Facades\FeedReader::class, // Add this line
],

Setup

Publishing the Configuration

After installing through composer, you should publish the config file. To do this, run the following command:, (*8)

$ php artisan vendor:publish --provider="Vedmant\FeedReader\FeedReaderServiceProvider"

Configuration Values

Once published, the configuration file contains an array of profiles. These will define how the RSS feed reader will react. By default the "default" profile will used. For more information on: here., (*9)

How to use

Once you have all of the configuration settings set up, in order to read a RSS feed all you need to do is call the read function:, (*10)

$f = FeedReader::read('https://news.google.com/news/rss');

echo $f->get_title();
echo $f->get_items()[0]->get_title();
echo $f->get_items()[0]->get_content();

This function accepts 2 parameters however, the second parameter is optional. The second parameter is the configuration profile that should be used when reading the RSS feed., (*11)

This will return to you the SimplePie object with the RSS feed in it. See SimplePie API for all available methods., (*12)

Passing curl options

You can also pass specific curl options per read() calls. You can pass these options, as an array as the 3rd parameter. The list of options can be found on the PHP Manual., (*13)

Example:, (*14)

// You need to log in to the rss endpoint with a Digest auth
$options = [
    'curl_options' => [
        CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
        CURLOPT_USERPWD => 'username:password',
    ],
];

$f = FeedReader::read('https://news.google.com/news/rss', 'default', $options);

License

Feed Reader is free software distributed under the terms of the MIT license, (*15)

Additional Information

Any issues, please report here, (*16)

The Versions

07/11 2015

dev-master

9999999-dev

A simple RSS feed reader for Laravel 5

  Sources   Download

MIT

The Requires

 

by Avatar vedmant

07/11 2015

1.2.1

1.2.1.0

A simple RSS feed reader for Laravel 5

  Sources   Download

MIT

The Requires

 

by Avatar vedmant

23/03 2015

1.2.0

1.2.0.0

A simple RSS feed reader for Laravel 5

  Sources   Download

MIT

The Requires

 

23/03 2015

dev-development

dev-development

A simple RSS feed reader for Laravel 5

  Sources   Download

MIT

The Requires

 

03/08 2014

1.1.0.1

1.1.0.1

A simple RSS feed reader for Laravel 4.1

  Sources   Download

MIT

The Requires

 

11/05 2014

1.1.0

1.1.0.0

A simple RSS feed reader for Laravel 4.1

  Sources   Download

MIT

The Requires

 

18/03 2014

v1.0.0

1.0.0.0

A simple RSS feed reader for Laravel 4.1

  Sources   Download

MIT

The Requires