RSS/Atom Feed Subscription Implementation for Website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

RSS and Atom Feed Subscription Implementation

RSS and Atom feeds allow readers to subscribe to updates via aggregators (Feedly, Inoreader, Reeder). Feeds are also used by news aggregators and SEO tools for indexing fresh content.

Laravel: RSS Feed

use Illuminate\Http\Response;
use Illuminate\Support\Facades\Cache;

class FeedController extends Controller
{
    public function rss(): Response
    {
        $feed = Cache::remember('rss_feed', 900, fn() => $this->buildRss());  // 15 minutes

        return response($feed, 200)->header('Content-Type', 'application/rss+xml; charset=utf-8');
    }

    private function buildRss(): string
    {
        $articles = Article::published()
            ->latest('published_at')
            ->limit(50)
            ->get();

        $lastBuild = $articles->first()?->published_at ?? now();

        return view('feeds.rss', compact('articles', 'lastBuild'))->render();
    }

    public function atom(): Response
    {
        $feed = Cache::remember('atom_feed', 900, fn() => $this->buildAtom());

        return response($feed, 200)->header('Content-Type', 'application/atom+xml; charset=utf-8');
    }
}
<!-- resources/views/feeds/rss.blade.php -->
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>{{ config('app.name') }}</title>
    <link>{{ url('/') }}</link>
    <description>{{ config('app.description') }}</description>
    <language>en</language>
    <lastBuildDate>{{ $lastBuild->toRssString() }}</lastBuildDate>
    <atom:link href="{{ route('feed.rss') }}" rel="self" type="application/rss+xml"/>
    <image>
      <url>{{ url('/logo.png') }}</url>
      <title>{{ config('app.name') }}</title>
      <link>{{ url('/') }}</link>
    </image>

    @foreach($articles as $article)
    <item>
      <title><![CDATA[{{ $article->title }}]]></title>
      <link>{{ route('articles.show', $article->slug) }}</link>
      <guid isPermaLink="true">{{ route('articles.show', $article->slug) }}</guid>
      <pubDate>{{ $article->published_at->toRssString() }}</pubDate>
      <author>{{ $article->author->email }} ({{ $article->author->name }})</author>
      <description><![CDATA[{{ $article->excerpt }}]]></description>
      @if($article->cover_image)
      <media:content url="{{ $article->cover_url }}" medium="image"/>
      @endif
      @foreach($article->tags as $tag)
      <category>{{ $tag->name }}</category>
      @endforeach
    </item>
    @endforeach
  </channel>
</rss>

Routes and Autodiscovery

// routes/web.php
Route::get('/feed', [FeedController::class, 'rss'])->name('feed.rss');
Route::get('/feed/atom', [FeedController::class, 'atom'])->name('feed.atom');
Route::get('/feed/{category}', [FeedController::class, 'category'])->name('feed.category');
<!-- In <head> for browser and aggregator autodiscovery -->
<link rel="alternate" type="application/rss+xml" title="{{ config('app.name') }} RSS" href="{{ route('feed.rss') }}">
<link rel="alternate" type="application/atom+xml" title="{{ config('app.name') }} Atom" href="{{ route('feed.atom') }}">

Implementation Timeline

RSS + Atom feed with caching and autodiscovery for Laravel: 0.5–1 day. With category/tag feeds and categorization: 1–2 days.