Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2024-10-20 (23 hours ago) | | Not enough user ratings | | Total: 3 This week: 3 | | All time: 11,460 This week: 16 |
|
Description | | Author |
This package provides an AP application that uses the MVC design pattern.
It implements a simple API that uses classes to implement controllers, models, HTTP request routing, an HTTP response handler, MySQL database access using PDO, and load configuration from environment variables.
The core class can run the API application by dispatching HTTP requests to the controller classes configured for the API application. | |
|
|
Innovation award
Nominee: 1x |
|
Example
<?php
require_once __DIR__ . '/../vendor/autoloader.php';
require_once __DIR__ . '/../routes/web.php';
use RestfulAPI\Utils\Env;
use RestfulAPI\Core\Core;
Env::load();
Core::run($router);
|
Details
Pure PHP Restful API ?
> The Pure PHP Restful API is a lightweight and efficient framework designed to facilitate the development of RESTful APIs using PHP. Its primary purpose is to streamline the process of creating web services that can handle various HTTP methods, allowing developers to easily manage data and interact with client applications.
Authors ?
-
For more information see my blog and my contributions to community.
- dantsec
Tech Stack ???
-
This project was developed with the following technologies:
- PHP (Main Language)
Documents ?
Installation / Run Locally ??
-
Important: First of all, you must have PHP and a server like APACHE installed;
#
# Put the project into the server folder (e.g.: `public_html`, `/var/www/html`)
#
#
# Setup your database and start your server
#
# e.g.:
sudo systemctl start xampp
#
# Copy .env.example and configure it
#
cp config/.env.example .env
#
# Go to: <PROTOCOL>://<HOST>:<PORT>/<PROJECT_PATH>/public
#
# e.g.:
brave http://localhost:8080/php-restful-api/public/
Todo List ?
-
Priority (1)
- [ ] "Universalize" `{id}` field in `Core/Core.php` line 32.
- [ ] Improve file security on `.htaccess`.
- [ ] Make migrations.
-
Priority (2)
- [ ] Make it full MVC (implementing _view_ like laravel <3)
Contributing ??
# Create a fork from the original repository and clone it.
git clone https://github.com/dantsec/php-restful-api.git
# Enter into the project folder.
cd php-restful-api/
# Create a new branch with the name feat-[BRANCH_NAME].
git checkout -b feat-[BRANCH_NAME]
# Make your changes and commit them.
git add . && git commit -m "YOUR_COMMIT_MESSAGE"
# Push your branch and open a pull request.
git push origin feat-[BRANCH_NAME]
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.