A little example of how to build fast, small APIs using Expressive and Doctrine.
It includes:
- Hal Responses
- Hydrators
- Doctrine ORM
- Problem Details Responses
In the ./bin directory there's a console.php script which provides a few commands. You can also use the Doctrine ORM commands from this console script!
- cache:clear - clears the config cache.
- You'll want to clone this repo:
$ git clone git@github.com:nic-d/expressive-api-example.git ~/my_directory
- You'll then need to install composer dependencies, so:
$ composer install
- You'll also need to create a .env file, and add your db details:
$ cp .env.dist .env
- Now just run this command to set up the db schema:
$ php ./bin/console.php orm:schema-tool:update --force
- That's pretty much it.