Example of api written in Slim Framework 4 @since 2019
- phpunit as unit testing framework
- slim/psr7 as PSR-7 implementation
- monolog/monolog as logger
- php-di/php-di as container implementation
- robmorgan/phinx as seeds and migrations
- vlucas/phpdotenv as loads environment variables
- illuminate/database as eloquent orm
- hassankhan/config as loads config
-
Run composer
$ composer install -
Edit Configuration
$ cp .env.dist .env -
Run the migrations
$ composer migrate $ composer seed -
Run the API
$ composer start -
Run the Test
$ composer test
| # | URL | METHOD |
|---|---|---|
| Get All Movies | api/v1/movies | GET |
| Get One Movie | api/v1/movies/{id} | GET |
| Create Movie | api/v1/movies/create | POST |
| Update Movie | api/v1/movies/{id} | PUT |
| Delete Movie | api/v1/movies/{id} | DELETE |
- authentication
- cache
- rate limit
- pagination
- doc
MIT