Skip to content

rafaeldias98/php-lumen-rest-api

Repository files navigation

PHP REST API (Lumen)

A simple Docker + PHP REST API using Lumen Framework

πŸ”– Summary

  1. Requirements
  2. Stack
  3. Setup and init API
  4. Open API container bash
  5. Run Tests
  6. Connect to mysql shell
  7. Create fake users
  8. Generate APIDOC
  9. Read docs
  10. Contribuiting

β˜‘οΈ Requirements

πŸ“‚ Stack

  • 🐳 Docker
  • πŸ™ Docker Compose
  • 🐘 PHP 7
  • 🐬 MySQL 8.0
  • 🎼 Composer
  • πŸ’‘ Lumen Framework
  • 🐢 Dingo

πŸš€ Setup and init API

$    echo "127.0.0.1	api.users.local" >> /etc/hosts
$    cp .env.example .env
$    docker-compose up

πŸ€– Open API container bash

$    ./bin/api.sh exec

πŸ’€ Run Tests

$    ./bin/tests.sh run

🐬 Connect to mysql shell

$    ./bin/mysql.sh exec

πŸ‘¨ Create fake users

$    ./bin/seeder.sh run

πŸ“° Generate APIDOC

$    ./bin/doc.sh create

πŸ“š Read docs

  • To learn how to use the API, read: docs/APIDOC.md
  • To speed up the use of API, see postman requests collection: docs/api_doc.postman_collection.json

πŸ”§ Contributing

contributions welcome

If you find any problem or have a suggestion, please open an issue.

About

A simple Docker + PHP REST API using Lumen Framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published