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
- Host: GitHub
- URL: https://github.com/farisc0de/api_framework
- Owner: farisc0de
- License: mit
- Created: 2022-01-02T00:29:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-20T11:36:39.000Z (about 4 years ago)
- Last Synced: 2025-06-04T08:57:33.824Z (about 1 year ago)
- Topics: api, api-wrapper, jwt-authentication, library, php, php8
- Language: PHP
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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