mhr / simple-restful
Agile Restful framework
v2.00
2020-09-18 07:57 UTC
Requires
- php: ^7.2
This package is auto-updated.
Last update: 2025-05-21 00:33:45 UTC
README
Author:
Mahdi Hasanpour mh.hasnapour@gmail.com
Getting Start
Install library with Composer
composer require mhr/simple-restful
Create a php file that all incoming request rewrite to it file (e.g. with .htaccess and RewriteEngine ) with below codes.
<?php require __DIR__ . '/vendor/autoload.php'; $core = new \SimpleRESTful\Core(); $core->addMiddleware(function ($next, \SimpleRESTful\HTTP\Response $response) { $next(); $response->generateOutput(); }); $core->run();