PHP REST API using slim framework and CRUD operations
📧
Contents
/routes/students.php folder contains all API methods for the CRUD operations
/config folder contains Mysql database configurations
/db folder contains database(.sql) file
/public folder contains a single index.php to instantiate the app.
😀
How to use this project
-
Well, first clone or download this repo.
-
Create a database and import db/studentdb.sql file in your database.
-
Change database configurations in config/Database.php file.
-
Install Composer and run 'composer update' to install all the packages mentioned in composer.json file.
-
Additionally, create a virtual host as mentioned in this site: Creating a virtual host in Windows
-
Check your endpoints.
📌
Endpoints
http://localhost/rest_api_with_slim/students/get
http://localhost/rest_api_with_slim/students/get/17
http://localhost/rest_api_with_slim/students/post
http://localhost/rest_api_with_slim/students/put/29
http://localhost/rest_api_with_slim/students/delete/29
📰
License
❤️
Loved this project?
Please give me a star