Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-01-27 (8 months ago) | Not enough user ratings | Total: 73 | All time: 10,228 This week: 47 |
Version | License | PHP version | Categories | |||
api_framework 1.0.0 | Custom (specified... | 5 | Web services, PHP 7 |
Description | Author | |
This package can be used to create new APIs using controller classes. |
<?php |
A PHP Framework for creating APIs
<a href="http://jwt.io"> <img src="http://jwt.io/img/badge-compatible.svg" /> </a>
This project is created using PHP 8.0+
Coding Standard is PSR-12
$ 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
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
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
MIT
2022 - fariscode
Files (23) |
File | Role | Description | ||
---|---|---|---|---|
api (3 files) | ||||
example (2 files) | ||||
src (1 directory) | ||||
api.sql | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
delete-expired-refresh-tokens.php | Example | Example script | ||
envfile | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (23) | / | api |
File | Role | Description |
---|---|---|
.htaccess | Data | Auxiliary data |
bootstrap.php | Example | Example script |
index.php | Example | Example script |
Files (23) | / | example |
File | Role | Description |
---|---|---|
index.html | Doc. | Documentation |
register.php | Example | Example script |
Files (23) | / | src | / | MY_Framework |
File | Role | Description | ||
---|---|---|---|---|
Exceptions (2 files) | ||||
Auth.php | Class | Class source | ||
BaseController.php | Class | Class source | ||
Database.php | Class | Class source | ||
ErrorHandler.php | Class | Class source | ||
JWTCodec.php | Class | Class source | ||
RefreshTokenGateway.php | Class | Class source | ||
TaskController.php | Class | Class source | ||
TaskGateway.php | Class | Class source | ||
UserController.php | Class | Class source | ||
UserGateway.php | Class | Class source |
Files (23) | / | src | / | MY_Framework | / | Exceptions |
File | Role | Description |
---|---|---|
InvalidSignatureException.php | Class | Class source |
TokenExpiredException.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.