PHP Classes

How to Create a PHP News Website that Shows News from Other Sites Using the Package News Aggregator Backend: Aggregate news from sites that provide RSS feeds

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2025-07-11 (4 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
news-aggregator-back 1.0The PHP License7Content management, Web services, PHP 7
Description 

Author

This package can aggregate news from sites that provide RSS feeds.

It provides an application that can fetch RSS feeds articles from several news sites and stores them in a database using the Laravel Artisan tool.

The application also provides an API that can retrieve articles or perform searches for articles in the database.

Picture of Okanlawon Anuoluwapo
  Performance   Level  
Name: Okanlawon Anuoluwapo <contact>
Classes: 7 packages by
Country: Nigeria Nigeria
Innovation award
Innovation award
Nominee: 4x

Instructions

Example

<?php
 
use Illuminate\Foundation\Application;
use
Illuminate\Foundation\Configuration\Exceptions;
use
Illuminate\Foundation\Configuration\Middleware;
use
Illuminate\Auth\AuthenticationException;
use
Illuminate\Http\Request;
 
return
Application::configure(basePath: dirname(__DIR__))
    ->
withRouting(
       
web: __DIR__.'/../routes/web.php',
       
api: __DIR__.'/../routes/api.php',
       
commands: __DIR__.'/../routes/console.php',
       
health: '/up',
    )
    ->
withMiddleware(function (Middleware $middleware) {
       
//
   
})
    ->
withExceptions(function (Exceptions $exceptions) {
       
$exceptions->render(function (AuthenticationException $e, Request $request) {
            if (
$request->is('api/*')) {
                return
response()->json([
                   
'message' => $e->getMessage(),
                ],
401);
            }
        });
    })->
create();


Details

About News Aggregator Backend

cd backend

This buid and start the container

docker-compose up --build

Start up the container and migrate the database tables

docker-compose up -d
docker exec -it laravel-app php artisan migrate

Run the scrape news command to save data locally

docker exec -it laravel-app php artisan scrape:news

container name: laravel-container

If you're running the container without Docker Compose, you can specify the name using the --name flag like this:

docker run --name laravel-container -p 8000:9000 laravel-app

To check the container running

docker ps

Access the Backend via localhost:8080 Public view:

docker pull anuthedeveloper/laravel-app:v1

  Files folder image Files (65)  
File Role Description
Files folder imageapp (4 directories)
Files folder imagebootstrap (2 files)
Files folder imageconfig (12 files)
Files folder imagedatabase (3 directories)
Files folder imagenginx (1 file)
Files folder imagepublic (3 files)
Files folder imageresources (3 directories)
Files folder imageroutes (3 files)
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file artisan Example Example script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file Dockerfile Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file postcss.config.js Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file tailwind.config.js Data Auxiliary data
Accessible without login Plain text file vite.config.js Data Auxiliary data

  Files folder image Files (65)  /  app  
File Role Description
Files folder imageConsole (1 file, 1 directory)
Files folder imageHttp (1 file, 2 directories)
Files folder imageModels (3 files)
Files folder imageProviders (1 file)

  Files folder image Files (65)  /  app  /  Console  
File Role Description
Files folder imageCommands (1 file)
  Plain text file Kernel.php Class Class source

  Files folder image Files (65)  /  app  /  Console  /  Commands  
File Role Description
  Plain text file FetchNews.php Class Class source

  Files folder image Files (65)  /  app  /  Http  
File Role Description
Files folder imageControllers (4 files)
Files folder imageRequests (4 files)
  Accessible without login Plain text file Kernel.php Aux. Configuration script

  Files folder image Files (65)  /  app  /  Http  /  Controllers  
File Role Description
  Plain text file ArticleController.php Class Class source
  Plain text file AuthController.php Class Class source
  Plain text file Controller.php Class Class source
  Plain text file UserPreferenceController.php Class Class source

  Files folder image Files (65)  /  app  /  Http  /  Requests  
File Role Description
  Plain text file LoginRequest.php Class Class source
  Plain text file RegisterRequest.php Class Class source
  Plain text file SavePreferencesRequest.php Class Class source
  Plain text file SearchArticleRequest.php Class Class source

  Files folder image Files (65)  /  app  /  Models  
File Role Description
  Plain text file Article.php Class Class source
  Plain text file User.php Class Class source
  Plain text file UserPreference.php Class Class source

  Files folder image Files (65)  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source

  Files folder image Files (65)  /  bootstrap  
File Role Description
  Accessible without login Plain text file app.php Example Example script
  Plain text file providers.php Class Class source

  Files folder image Files (65)  /  config  
File Role Description
  Accessible without login Plain text file app.php Aux. Configuration script
  Plain text file auth.php Class Class source
  Accessible without login Plain text file cache.php Aux. Configuration script
  Accessible without login Plain text file database.php Aux. Configuration script
  Accessible without login Plain text file filesystems.php Aux. Configuration script
  Plain text file jwt.php Class Class source
  Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Configuration script
  Accessible without login Plain text file news.php Aux. Configuration script
  Accessible without login Plain text file queue.php Aux. Configuration script
  Accessible without login Plain text file services.php Aux. Configuration script
  Accessible without login Plain text file session.php Aux. Configuration script

  Files folder image Files (65)  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (5 files)
Files folder imageseeders (1 file)

  Files folder image Files (65)  /  database  /  factories  
File Role Description
  Plain text file UserFactory.php Class Class source

  Files folder image Files (65)  /  database  /  migrations  
File Role Description
  Plain text file 0001_01_01_000000_create_users_table.php Class Class source
  Plain text file 0001_01_01_000001_create_cache_table.php Class Class source
  Plain text file 0001_01_01_000002_create_jobs_table.php Class Class source
  Plain text file 2025_02_15_001415_..._articles_table.php Class Class source
  Plain text file 2025_02_15_001453_...eferences_table.php Class Class source

  Files folder image Files (65)  /  database  /  seeders  
File Role Description
  Plain text file DatabaseSeeder.php Class Class source

  Files folder image Files (65)  /  nginx  
File Role Description
  Accessible without login Plain text file default.conf Data Auxiliary data

  Files folder image Files (65)  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Appl. Web application script
  Accessible without login Plain text file robots.txt Doc. Documentation

  Files folder image Files (65)  /  resources  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (2 files)
Files folder imageviews (1 file)

  Files folder image Files (65)  /  resources  /  css  
File Role Description
  Accessible without login Plain text file app.css Data Auxiliary data

  Files folder image Files (65)  /  resources  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data
  Accessible without login Plain text file bootstrap.js Data Auxiliary data

  Files folder image Files (65)  /  resources  /  views  
File Role Description
  Accessible without login Plain text file welcome.blade.php Aux. Configuration script

  Files folder image Files (65)  /  routes  
File Role Description
  Accessible without login Plain text file api.php Conf. API route configuration scrip
  Accessible without login Plain text file console.php Conf. Console route configuration script
  Accessible without login Plain text file web.php Conf. Web route configuration script

  Files folder image Files (65)  /  tests  
File Role Description
Files folder imageFeature (1 file)
Files folder imageUnit (3 files)
  Plain text file TestCase.php Class Class source

  Files folder image Files (65)  /  tests  /  Feature  
File Role Description
  Plain text file ExampleTest.php Class Class source

  Files folder image Files (65)  /  tests  /  Unit  
File Role Description
  Plain text file ExampleTest.php Class Class source
  Plain text file LoginTest.php Class Class source
  Plain text file PreferenceTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0