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.
- Implement CRUD operations with respective HTTP methods.
- Consistent and uniform of response structure (JSON schema).
- Handling particular exceptions and errors for the whole app.
- Basic implementation of Laravel migrations, factories, and seeders.
Tools and versions:
Lumen: ^8.0
Composer: 2.1.3
PHP: ^7.4.16
Database Provider:
- sqlite3
Additional Tools:
- OSSP
uuid
: Used to generateAPP_KEY
env variable manually.
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 useContent-Type: multipart/form-data
for its HTTP request header field.PUT
andPATCH
method should useContent-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.