- Installation
- Usage
- Docs
- install Composer
composer require alexdevid/rest-server:dev-master
Somewhere in the begining of your script add this:
<?php
$server = new Alexdevid\RestServer
$server->run();
Then add Controllers
Controllers should extend Alexdevid\RestController
class and it methods:
public function get();
public function post();
public function put();
public function delete();
Each method is responsible for its own request method.
Look examples
folder for more info
You can run PHPUnit tests in tests folder