- There no special technique, just clone this repository into you local server or development machine
- You may set up a virtual host in the web server to run the application
- Create a mysql database
- Import the .sql file (data/product.sql) in your created database.
- in order to have a working example, i created a sample product table
- Change your database configurations in config/config.php.
- Everything is ready to go you can now call a simple api request
url: /index.php?api_name=product
description: get all the product lists
url: /index.php?api_name=product&id=2
description: get the product by its id
url: /index.php?api_name=product
params in the request body: name, description, price
description: add a new product
url: /index.php?api_name=product&id=2
description: Delete a product by its id
url: /index.php?api_name=product&id=2
params in the request body: name, description, price
description: update product
You can test the api request by using a Postman. It is a chrome tool for the REST client.