Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

feeds

> 编程语言
Open source

A simple Laravel service provider for including the SimplePie library.

313 stars0 likes0 views
WebsiteGitHub

About

A simple Laravel service provider for including the SimplePie library.

Laravel Feeds

A simple Laravel 5/6/7/8/9/10 service provider for including the SimplePie library.

Installation

The Laravel 5/6/7/8/9/10 Feeds Service Provider can be installed via Composer by requiring the willvincent/feeds package in your project's composer.json.

json
{
    "require": {
        "willvincent/feeds": "2.3.*"
    }
}

Configuration

If you're using Laravel 5.5 or newer you may skip the next step.

To use the Feeds Service Provider, you must register the provider when bootstrapping your Laravel application.

Find the providers key in your config/app.php and register the Service Provider.

php
    'providers' => [
        // ...
        willvincent\Feeds\FeedsServiceProvider::class,
    ],

Find the aliases key in your config/app.php and register the Facade.

php
    'aliases' => [
        // ...
        'Feeds'    => willvincent\Feeds\Facades\FeedsFacade::class,
    ],

Usage

Run php artisan vendor:publish --provider="willvincent\Feeds\FeedsServiceProvider" to publish the default config file, edit caching setting withing the resulting config/feeds.php file as desired.

See SimplePie Documentation for full API usage documentation.

The make() accepts 3 paramaters, the first parameter is an array of feed URLs, the second parameter is the max number of items to be returned per feed, and while the third parameter is a boolean which you can set to force to read unless content type not a valid RSS.

php
$feed = \Feeds::make('http://feed/url/goes/here');
Note: In Laravel 5 and newer, Facades must either be prefixed with a backslash, or brought into scope with a use [facadeName] declaration.

Example controller method, and it's related view:

Controller:

php
  public function demo() {
    $feed = \Feeds::make('http://blog.case.edu/news/feed.atom');
    $data = array(
      'title'     => $feed->get_title(),
      'permalink' => $feed->get_permalink(),
      'items'     => $feed->get_items(),
    );

    return View::make('feed', $data);
  }

or Force to read unless content type not a valid RSS

php
  public function demo() {
    $feed = \Feeds::make('http://blog.case.edu/news/feed.atom', true); // if RSS Feed has invalid mime types, force to read
    $data = array(
      'title'     => $feed->get_title(),
      'permalink' => $feed->get_permalink(),
      'items'     => $feed->get_items(),
    );

    return View::make('feed', $data);
  }

Multifeeds example controller method, and it's related view:

Controller:

php
  public function demo() {
    $feed = \Feeds::make([
        'http://blog.case.edu/news/feed.atom',
        'http://tutorialslodge.com/feed'
    ], 5);
    $data = array(
      'title'     => $feed->get_title(),
      'permalink' => $feed->get_permalink(),
      'items'     => $feed->get_items(),
    );

    return View::make('feed', $data);
  }

or Force to read unless content type not a valid RSS

php
  public function demo() {
        $feed = \Feeds::make(['http://blog.case.edu/news/feed.atom',
        'http://tutorialslodge.com/feed'
    ], 5, true); // if RSS Feed has invalid mime types, force to read
    $data = array(
      'title'     => $feed->get_title(),
      'permalink' => $feed->get_permalink(),
      'items'     => $feed->get_items(),
    );

    return View::make('feed', $data);
  }

View:

php
@extends('app')

@section('content')
  

  @foreach ($items as $item)
    

  @endforeach
@endsection

Issues· 6 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHP

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言