Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evilfreelancer/laravel-swagger-example
Small example application with basic realization of Swagger on Laravel Framework
https://github.com/evilfreelancer/laravel-swagger-example
docker docker-compose example laravel openapi swagger
Last synced: about 2 months ago
JSON representation
Small example application with basic realization of Swagger on Laravel Framework
- Host: GitHub
- URL: https://github.com/evilfreelancer/laravel-swagger-example
- Owner: EvilFreelancer
- Created: 2019-05-16T19:54:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T21:31:47.000Z (almost 2 years ago)
- Last Synced: 2024-04-28T05:53:27.842Z (8 months ago)
- Topics: docker, docker-compose, example, laravel, openapi, swagger
- Language: PHP
- Size: 706 KB
- Stars: 18
- Watchers: 2
- Forks: 8
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Laravel 8 + Swagger demo application
This application based on Docker containers, here is the list:
* mariadb - Database server
* phpmyadmin - For management of MySQL
* laravel - Login pages, API and VueJS![Image](demo.jpg)
## How to use
### 1. Preparation
Clone the repo and change your work directory to root of sources
git clone https://github.com/EvilFreelancer/laravel-swagger-example.git
cd laravel-swagger-example
cp docker-compose.dist.yml docker-compose.ymlInside `docker-compose.yml` you need change the values to the ones you
need, for example you do not want to tun this project on `8080` port, to
fix that you need just change this line `80:8080` to what you need (`7777:8080`).Run first iteration of Docker environment
docker-compose up -d
### 2. Install all required components
I assume that there are no development tools on your computer, so you
need to login to Laravel container:docker-compose exec laravel bash
Install all dependencies
composer install
### 3. Set up the application
Create database and seed tables:
php artisan migrate:fresh --seed
### 4. Generate swagger frontend
Generate interactive documentation:
php artisan l5-swagger:generate
## The End
Now you just need open following page [http://localhost/api/documentation](http://localhost/api/documentation) in your browser.
Thanks for reading!