PHP Classes

PHP Article System API: Manage collections of articles using API requests

Recommend this page to a friend!
  Info   View files Example   View files View files (96)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-01-15 (5 months ago) RSS 2.0 feedNot enough user ratingsTotal: 118 All time: 9,374 This week: 174Up
Version License PHP version Categories
articles 1.0.0The PHP License5PHP 5, Content management, Web services
Description Author

This package can manage collections of articles using API requests.

It provides an application that handles HTTP request for an API that can perform several operations on collections of publishing articles.

Currently it implements several types of operations like:

- Register and login users that can access the API

- Create a new article

- Get a list of all articles

- Get an individual article

- Update an article

- Delete an article

- Rate an article

- Search for articles

Innovation Award
PHP Programming Innovation award nominee
January 2022
Number 6
Many sites publish content stored in a database in the form of articles.

This package provides an API that other sites can use to perform the operations to manipulate the content of the articles.

This way, the API can be reused by many other sites that do not need to maintain the article management service.

Manuel Lemos
Picture of uche
Name: uche <contact>
Classes: 9 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 295019 in Nigeria Nigeria
Week rank: 163 Up4 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 7x

Details

About Project

This is an articles API that create, fetch, search, delete, update and rate articles. Authentication was implemented on endpoints that requires a user to create, update or delete an article using Laravel Passport. A user is thus required to pass the bearer token to these endpoints.

The endpoints for authentication:

Register a new user

/api/register
Method - POST
Body - name, email, password

Login an existing user

/api/login
Method - POST
Body -email, password

The endpoints for articles:

Create an article

/api/articles
Method ? POST
Body ? title, body

Get articles

/api/articles
Method ? GET

Get an article

/api/articles/{id}
Method ? GET

Update an article

/api/articles/{id}
Method ? PUT
Body - title, body

Delete an article

/api/articles/{id}
Method ? DELETE

Rate an article

/api/articles/{id}/rating
Method ? POST
Body - rating (must be between 1 - 5)

Search for article

/api/articles/search/{query}
Method ? GET

To get started: + clone or download source code (unzip) + cd to project folder + Set database credentials in .env file + Run composer install + Run php artisan migrate for migrations + Run php artisan passport:install to set up encryption keys to generate tokens + Run php artisan serve to test endpoints + You can run php artisan db:seed to work with existing data

  Files folder image Files  
File Role Description
Files folder image.idea (7 files)
Files folder imageapp (2 files, 5 directories)
Files folder imagebootstrap (1 file)
Files folder imageconfig (13 files)
Files folder imagedatabase (3 directories)
Files folder imagepublic (4 files, 2 directories)
Files folder imageresources (4 directories)
Files folder imageroutes (4 files)
Files folder imagetests (2 files, 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 .styleci.yml Data Auxiliary data
Plain text file artisan Class Class source
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 package.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation
Accessible without login Plain text file server.php Aux. Auxiliary script
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file articles-api.iml Data Auxiliary data
  Accessible without login Plain text file encodings.xml Data Auxiliary data
  Accessible without login Plain text file misc.xml Data Auxiliary data
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file php.xml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data
  Accessible without login Plain text file workspace.xml Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageConsole (1 file)
Files folder imageExceptions (1 file)
Files folder imageHttp (1 file, 2 directories)
Files folder imageLibraries (1 file)
Files folder imageProviders (5 files)
  Plain text file Article.php Class Class source
  Plain text file User.php Class Class source

  Files folder image Files  /  app  /  Console  
File Role Description
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Exceptions  
File Role Description
  Plain text file Handler.php Class Class source

  Files folder image Files  /  app  /  Http  
File Role Description
Files folder imageControllers (4 files, 1 directory)
Files folder imageMiddleware (7 files)
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  
File Role Description
Files folder imageAuth (5 files)
  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 HomeController.php Class Class source

  Files folder image Files  /  app  /  Http  /  Controllers  /  Auth  
File Role Description
  Plain text file ForgotPasswordController.php Class Class source
  Plain text file LoginController.php Class Class source
  Plain text file RegisterController.php Class Class source
  Plain text file ResetPasswordController.php Class Class source
  Plain text file VerificationController.php Class Class source

  Files folder image Files  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file Authenticate.php Class Class source
  Plain text file CheckForMaintenanceMode.php Class Class source
  Plain text file EncryptCookies.php Class Class source
  Plain text file RedirectIfAuthenticated.php Class Class source
  Plain text file TrimStrings.php Class Class source
  Plain text file TrustProxies.php Class Class source
  Plain text file VerifyCsrfToken.php Class Class source

  Files folder image Files  /  app  /  Libraries  
File Role Description
  Plain text file Utilities.php Class Class source

  Files folder image Files  /  app  /  Providers  
File Role Description
  Plain text file AppServiceProvider.php Class Class source
  Plain text file AuthServiceProvider.php Class Class source
  Plain text file BroadcastServiceProvider.php Class Class source
  Plain text file EventServiceProvider.php Class Class source
  Plain text file RouteServiceProvider.php Class Class source

  Files folder image Files  /  bootstrap  
File Role Description
  Plain text file app.php Class Class source

  Files folder image Files  /  config  
File Role Description
  Plain text file app.php Class Class source
  Plain text file auth.php Class Class source
  Accessible without login Plain text file broadcasting.php Aux. Auxiliary script
  Accessible without login Plain text file cache.php Aux. Auxiliary script
  Accessible without login Plain text file database.php Aux. Auxiliary script
  Accessible without login Plain text file filesystems.php Aux. Auxiliary script
  Accessible without login Plain text file hashing.php Aux. Auxiliary script
  Plain text file logging.php Class Class source
  Accessible without login Plain text file mail.php Aux. Auxiliary script
  Accessible without login Plain text file queue.php Aux. Auxiliary script
  Plain text file services.php Class Class source
  Accessible without login Plain text file session.php Aux. Auxiliary script
  Accessible without login Plain text file view.php Aux. Auxiliary script

  Files folder image Files  /  database  
File Role Description
Files folder imagefactories (1 file)
Files folder imagemigrations (3 files)
Files folder imageseeds (2 files)

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

  Files folder image Files  /  database  /  migrations  
File Role Description
  Plain text file 2014_10_12_000000_create_users_table.php Class Class source
  Plain text file 2014_10_12_100000_...rd_resets_table.php Class Class source
  Plain text file 2019_09_09_104651_..._articles_table.php Class Class source

  Files folder image Files  /  database  /  seeds  
File Role Description
  Plain text file ArticlesSeeder.php Class Class source
  Plain text file DatabaseSeeder.php Class Class source

  Files folder image Files  /  public  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Plain text file index.php Class Class source
  Accessible without login Plain text file robots.txt Doc. Documentation
  Accessible without login Plain text file web.config Data Auxiliary data

  Files folder image Files  /  public  /  css  
File Role Description
  Accessible without login Plain text file app.css Data Auxiliary data

  Files folder image Files  /  public  /  js  
File Role Description
  Accessible without login Plain text file app.js Data Auxiliary data

  Files folder image Files  /  resources  
File Role Description
Files folder imagejs (2 files, 1 directory)
Files folder imagelang (1 directory)
Files folder imagesass (2 files)
Files folder imageviews (2 files, 2 directories)

  Files folder image Files  /  resources  /  js  
File Role Description
Files folder imagecomponents (1 file)
  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  /  resources  /  js  /  components  
File Role Description
  Accessible without login Plain text file ExampleComponent.vue Data Auxiliary data

  Files folder image Files  /  resources  /  lang  
File Role Description
Files folder imageen (4 files)

  Files folder image Files  /  resources  /  lang  /  en  
File Role Description
  Accessible without login Plain text file auth.php Aux. Auxiliary script
  Accessible without login Plain text file pagination.php Aux. Auxiliary script
  Accessible without login Plain text file passwords.php Aux. Auxiliary script
  Accessible without login Plain text file validation.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file app.scss Data Auxiliary data
  Accessible without login Plain text file _variables.scss Data Auxiliary data

  Files folder image Files  /  resources  /  views  
File Role Description
Files folder imageauth (3 files, 1 directory)
Files folder imagelayouts (1 file)
  Accessible without login Plain text file home.blade.php Aux. Auxiliary script
  Accessible without login Plain text file welcome.blade.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  views  /  auth  
File Role Description
Files folder imagepasswords (2 files)
  Accessible without login Plain text file login.blade.php Aux. Auxiliary script
  Accessible without login Plain text file register.blade.php Aux. Auxiliary script
  Accessible without login Plain text file verify.blade.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  views  /  auth  /  passwords  
File Role Description
  Accessible without login Plain text file email.blade.php Aux. Auxiliary script
  Accessible without login Plain text file reset.blade.php Aux. Auxiliary script

  Files folder image Files  /  resources  /  views  /  layouts  
File Role Description
  Accessible without login Plain text file app.blade.php Aux. Auxiliary script

  Files folder image Files  /  routes  
File Role Description
  Accessible without login Plain text file api.php Aux. Auxiliary script
  Accessible without login Plain text file channels.php Example Example script
  Accessible without login Plain text file console.php Example Example script
  Accessible without login Plain text file web.php Example Example script

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

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

  Files folder image Files  /  tests  /  Unit  
File Role Description
  Plain text file ExampleTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:118
This week:0
All time:9,374
This week:174Up
For more information send a message to info at phpclasses dot org.