Download the PHP package webwizardsusa/larafeed without Composer

On this page you can find all versions of the php package webwizardsusa/larafeed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package larafeed

RSS Feeds For Laravel

This package provides advanced RSS style feeds, including support for Podcast/ITunes feeds.

Installation

You can install the package via composer:

Publishing the configuration (optional)

Usage

Generating a feed is extremely simple. Let's say you have a model calls Post and want to supply an RSS feed of that. You simply add the interface Webwizardsusa\Larafeed\Contracts\ProvidesFeedItem to your model and define the public method toFeedItem():

Models\Post

Next create your controller:

And that is all. The route you set to that controller will have a valid RSS feed.

Of course, you aren't limited to feed items from models. Any class that implements ProvidesFeedItem can supply a feed item. You can also pass an array or collection of FeedItem and/or PodcastItemto the 4th parameter on Channel::make.

ITunes Support

This package provides support for iTunes out of the box, including iTunes categories. There are classes for all defined iTunes categories in ITunes/Categories. If you add a child of a category, the parent category will automatically be added. For example:

Will automatically add:

to the channel of the feed.

Validation

When creating a feed, there are validation methods for both feed items and the channel. For example, if your feed contains a PodCast item, then the itunesImage must be set on the channel. All urls are also checked to be absolute. Other validation rules from both the RSS feed specification and iTunes feed specification are checked. If any of these fail during building, then an exception is thrown.

Extensibility

This package was written with extensibility in mind. You can create different types of feed items. Change the RSS name spaces. You can even generate a totally different style feed, such as JSON, via the use of generators. To help with this, here's a basic description of the various parts of this package:

Channel

A channel is either Webwizardsusa\Larafeed\Channel or a class that extends that. The channel handles generating the entire feed, via generators. It can also supply a response, so you can simply return a channel from a controller.

FeedItems

A feed item is a class that extends Webwizardsusa\Larafeed\BaseFeedItem. By default, we supply two types of feed item classes:

  1. Webwizardsusa\Larafeed\FeedItem - this is a basic feed item.
  2. Webwizardsusa\Larafeed\PodcastItem - this is a feed item that includes iTunes/Podcast information.

All feed items are validated when building. For example, it checks that URLs are absolute.

Enclosures:

Enclosures are a way to supply media to a feed item. For a basic feed, this could be an image that is displayed in the feed reader. For a PodcastItem, this is required and will be the link to the actual media item. Enclosures do require a mimetype. If your enclosure URL has a proper extension, then the system will try to determine the mimetype from that. If not, or if you want to force a mimetype, you can supply it to the enclosure.

Elements

When a channel or feed item is built, it generates a \Webwizardsusa\Larafeed\HelpersElementCollection. This is a custom collection to work with the parts of channels and feeds. Elements are simple classes that implement \Webwizardsusa\Larafeed\Contracts\Element.

Generators

Once the element tree is built, then the channel can be rendered. For this, we use generators. Currently there is only a single generator, \Webwizardsusa\Larafeed\Generators\RssGenerator. This uses DOMDocument to generate a valid and well-formed RSS feed.

Generators are assigned to Channels, so if you wish to offer something like a JSON feed, you can do so by creating a new generator and telling the channel to use that, with $channel->generator({generator class name}).

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

This package is developed by WebWizardsUSA.

License

The MIT License (MIT). Please see License File for more information.


All versions of larafeed with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^10.0|^11.0
illuminate/http Version ^10.0|^11.0
illuminate/contracts Version ^10.0|^11.0
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webwizardsusa/larafeed contains the following files

Loading the files please wait ....