/lumen_restfullapi_basic

Build RESTfull API with lumen and MySQL

Primary LanguagePHP

PHP - Lumen Framework - RESTfull API

RESTfull API build on :

  • PHP Language
  • Laravel Base
  • Lumen Framework
  • MVC Pattern
  • Depedencies : Eloquent, Facades.
  • MariaDB

Installation

PHP required v7.3.* or Higher to run MariaDB required v10.* to run or with XAMPP Link / Laragon

- Download or Clone from Github -
cd lumen_restfullapi_basic
cp .env.example .env

Edit this line

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE={yourdatabase}
DB_USERNAME={yaourusername}
DB_PASSWORD={yourpassword}

Running Code

php -S localhost:8000 -t public

API Endpoint

METHOD ENDPOINT Description
GET http://{yourhost}:8000/api/authors GET ALL Authors
GET http://{yourhost}:8000/api/authors/{id} GET ONE Authors
POST http://{yourhost}:8000/api/authors CREATE Authors
PUT http://{yourhost}:8000/api/authors/{id} UPDATE Authors
DELETE http://{yourhost}:8000/api/authors/{id} DELETE Authors

Postman Collection

File on Directory demo/postman

License

MIT