An open API service indexing awesome lists of open source software.

https://github.com/farisc0de/api_framework

A PHP Framework for creating APIs
https://github.com/farisc0de/api_framework

api api-wrapper jwt-authentication library php php8

Last synced: 7 months ago
JSON representation

A PHP Framework for creating APIs

Awesome Lists containing this project

README

          

# API_Framework

A PHP Framework for creating APIs



## PHP Version

This project is created using PHP 8.0+

Coding Standard is PSR-12

## Installation

```bash
$ composer update
$ composer dump-autoload
```

Import api.sql to your phpmyadmin

Generate 256-bit key from here [allkeysgenerator](https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx)

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

```bash
$ 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