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