PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Simple PHP API Framework   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Simple PHP API Framework
Create new APIs using controller classes
Author: By
Last change:
Date: 10 months ago
Size: 1,067 bytes
 

Contents

Class file image Download

API_Framework

A PHP Framework for creating APIs

<a href="http://jwt.io"> <img src="http://jwt.io/img/badge-compatible.svg" /> </a>

PHP Version

This project is created using PHP 8.0+

Coding Standard is PSR-12

Installation

$ composer update
$ composer dump-autoload

Import api.sql to your phpmyadmin

Generate 256-bit key from here allkeysgenerator

Update .env file

The system has 2 authentication methods

  1. JWT Token [token]
  2. API Key [key]

After that just create an account using /register endpoint and POST method

$ httpie post http://localhost/api/register name="Root" username="admin" password="admin"

or

Use the example to create an account

You can reuse the example for any project you want

Enjoy

Example Project

TaskController.php

TaskGateway.php

Are an example project to show how the system work

Also you can reuse the code in it and change it to your specifications

License

MIT

Copyright

2022 - fariscode