Author: ShairyPortfolio

  • PHP REST API CRUD – Step 8

    PHP REST API CRUD – Step 8

    Step 8 Create API for read single and all data Create a new file called read_user.php in user folder and Following steps to be performed for this We need to set headers on this new file. 2.  Connect to database and register table 3.  Assign submitted data to object properties 4.  Use the read () and readSingleUser() method…

  • PHP REST API CRUD – Step 7

    PHP REST API CRUD – Step 7

    Step 7 Read Data After successfully insertion of user, now we read the complete data or single user data. For this we will add 2 functions in user.php of object folder.

  • PHP REST API CRUD – Step 6

    PHP REST API CRUD – Step 6

    Step 6 Output for insert user To test for the successful creation of a data, open POSTMAN. Enter the following as the request URL http://localhost/PHP REST API CRUD with JWT Authentication\api\User \create_user.php Click the “form-data” tab. Enter key and value Send

  • PHP REST API CRUD – Step 5

    PHP REST API CRUD – Step 5

    Step 5 Create API for user Create user folder and Create a new file called create_user.php and Following steps to be performed for this 1. We need to set headers on this new file. 2. Connect to database and register table 3.  Assign submitted data to object properties 4.  Use the create () method