Skip to content

Simple Lumen application to perform basic CRUD actions.

License

Notifications You must be signed in to change notification settings

KennFatt/lumen-crud-api

Repository files navigation

Author Service API

A RESTful API application built with Lumen - PHP Micro-framework by Laravel. The goal of this application is to perform CRUD actions through some endpoints.

🎯 Goals

  1. Implement CRUD operations with respective HTTP methods.
  2. Consistent and uniform of response structure (JSON schema).
  3. Handling particular exceptions and errors for the whole app.
  4. Basic implementation of Laravel migrations, factories, and seeders.

🏗️ Development Environment

Tools and versions:

Lumen: ^8.0
Composer: 2.1.3
PHP: ^7.4.16

Database Provider:

  • sqlite3

Additional Tools:

  • OSSP uuid: Used to generate APP_KEY env variable manually.

🚏 Endpoints

Method Endpoint Status Description
GET /authors 200 Retrieve list of authors
GET /authors/{authorId} 200 Retrieve one of author data
POST /authors 201 Create and store new author data into DB
PUT /authors/{authorId} 200 Update existing author data
PATCH /authors/{authorId} 200 Update existing author data
DELETE /authors/{authorId} 200 Delete specific author from the DB

Additional information:

  • POST method should use Content-Type: multipart/form-data for its HTTP request header field.
  • PUT and PATCH method should use Content-Type: application/x-www-form-urlencoded for its HTTP request header field.
  • Some endpoints will be returning an error (either internal or client), please keep in mind for the status code could change respectively to the error.

About

Simple Lumen application to perform basic CRUD actions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published