Creating an RSS feed in Laravel isn’t the most challenging task, but using a package and a few tips can help you create an RSS feed relatively quick.
We are going to use the spatie/laravel-feed package to walk through going from a brand new Laravel 5.6 project to serving RSS feeds.
The tutorial then goes through each step along the way, providing code and commands to get you up and running:
- Setting up a new Laravel project
- Modeling the data
- Setting up the (event) model
- Creating the Routes and the Events Controller
- Linking to the feed
The result is a simple RSS feed that can be linked to from a
link tag in your site and provide a list of upcoming events.