A simple rest api which is built using object oriented php for performing the CRUD operations.
Create a project folder in htdocs if you are using XAMPP , in case you are using WAMP the root directory will be www. Dump all the codes on that folder.
Create a database in phpmyadmin and then import the products.sql file on it, change the config parameters in the config/configuration.php file as per yours.
You can use any REST client
Here are the end points :
http://localhost/YOUR_FOLDER_NAME/api/create.php
http://localhost/YOUR_FOLDER_NAME/api/get-all-products.php
http://localhost/YOUR_FOLDER_NAME/api/get-product.php?product_id=YOUR_PRODUCT_ID
http://localhost/YOUR_FOLDER_NAME/api/update-product.php?product_id=YOUR_PRODUCT_ID
http://localhost/YOUR_FOLDER_NAME/api/delete-product.php?product_id=YOUR_PRODUCT_ID
REST API WITH PHP
Suvarthi
1.0.0
This project is licensed under the MIT License