Build a Simple REST API in PHP
This repo demonstrates how to create a basic REST API in core PHP and Implement JSON Web Tokens (JWTs).
Prerequisites: PHP, Composer, MySQL, JWTs
MAMP,
XAMPP, etc.
The .htaccess file in the API folder contains directives for URL rewriting and setting environment variables for HTTP authorization.
The .env file in the project contains sensitive information such as database credentials and secret keys.
NB: users should ensure that the SECRET_KEY used in their projects is unique and secure.
Clone this project using the following commands:
git clone git@github.com:morotijani/rest-api-php.git
cd rest-api-php
composer install
Step 1: Accessing PHPMyAdmin
Step 2: Creating the Database
Step 3: Importing the SQL File api.sample.sql
Step 4: Verifying the Import
Step 5: Fill the details in the .env file.
NB: Get complete and genuine verion here https://github.com/morotijani/truss ... i just did not want to delete this repo becuase people have started and already using it.