PHP code example of ejdelmonico / laravel-rss-feed

1. Go to this page and download the library: Download ejdelmonico/laravel-rss-feed library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ejdelmonico / laravel-rss-feed example snippets


php artisan vendor:publish --provider="ejdelmonico\LaravelRSSFeed\LaravelRSSFeedServiceProvider" --tag=config

Route::get('feed', function () {
    $url = 'https://blog.errordetective.com/rss/';
    $rss = Feed::makeRequest($url);
    $data = array(
        'title' => $rss->feed->get_title(),
        'permalink' => $rss->feed->get_permalink(),
        'items' => $rss->feed->get_items(),
    );
    return view('pages.feed', $data);
});