A lightweight REST API framework
A minimal PHP 8 REST API built onto php-microframework.
- Automatic routing based on URL path, e.g.
The framework is currently in development and subject to frequent change. A stable version with tagged release will be made available when ready.
composer create-project johnsquibb/rest-api:dev-main
Use the builtin PHP server to serve from the public directory during development:
php -S localhost:8080 -t public
Then visit: http://localhost:8080/api to view the demo.
The Demo resource at http://localhost:8080/api/demo provides the following operations:
- GET (collection)
- GET (item)
- POST (create item)
- PUT (update item)
- DELETE (item)