This in an example of a basic Laravel project running in a dockerized environment with PHP, Nginx and Mysql.
- Copy
.env.exampleto.env - Copy
code/api/.env.exampletocode/api/.env - Run:
docker-compose up - Run:
docker-compose exec php php artisan migrate
Now you can access the API endpoints:
- http://localhost/api/users
- http://localhost/api/users/1
- http://localhost/api/users/1/posts
- http://localhost/api/posts/1/comments
You can read more about the Laravel App.