Skip to content

DayaneCordeiro/PHP_API_REST

Repository files navigation

PHP API REST 🐘

This API is intended to allow to access a users CRUD.

Badge Badge Badge Badge Badge Badge Badge Badge Badge GitHub issues GitHub forks GitHub stars

AboutPre requirementsHow to useTechnologiesAuthor

🏁 PHP API REST ✔ version 2.0.3 is ready 🏁

About

This is a project that addresses an API in pure PHP in a simple way. The objective was to create a user control system that has a CRUD and a login method, and these functions can be accessed when the API is properly authenticated.

Pre requirements

🔹 To use the project it is necessary to have PHP and Apache installed on the computer considering that the system will run the system at localhost. For the development of this project, the XAMPP tool was used, which can be accessed at the following address: https://www.apachefriends.org/download.html
🔹 It is also necessary to have an API Client Platform. In this project Insomnia was used. This software can be found at the follow address: https://insomnia.rest/download
🔹 You have to create the project database. You have to go to database folder, copy the sql code and paste in into the database manager of your choice (In this project SQLyog Communit software was used, you can find it in https://code.google.com/archive/p/sqlyog/wikis/Downloads.wiki). Press CTRL + A to select all SQL code and press to run. You will have two tables: user and log_change_user as the following images.

user_table

log_change_user_table

How to use

🔹 The first step is to clone the project into the XAMPP htdocs folder, this is an example: xampp/htdocs/PHP_API_REST/clone here.
🔹 To run the API it is necessary to have the Apache server and PHP connected.
🔹 Go to the documentation/documents folder and open the index.html file in the browser of your choice. This file shows how to use each of the API endpoints. You can see a endpoint documentation example in the following image:

documentation_example

🔹 Note that it is necessary to put the project path before the endpoint in the URL inside Insomnia. See the example:

request_example

🔹 With the server and PHP working, you can use Insomnia to access the API functions, all the details are in the documentation mentioned in the previous topic.

Technologies

The following tools were used in the construction of the project:

Author


Dayane Cordeiro

Made with ❤️ by Dayane Cordeiro!

✔ Computer Engineering student at PUC Minas
✔ PHP Developer
✔ Passionate about computer architecture and learning.

Linkedin Badge Gmail Badge