Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/latrell/swagger
Swagger for Laravel
https://github.com/latrell/swagger
laravel swagger swagger-ui
Last synced: 4 days ago
JSON representation
Swagger for Laravel
- Host: GitHub
- URL: https://github.com/latrell/swagger
- Owner: latrell
- Created: 2014-07-09T06:52:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T04:16:56.000Z (almost 6 years ago)
- Last Synced: 2024-09-15T15:38:44.713Z (about 2 months ago)
- Topics: laravel, swagger, swagger-ui
- Language: HTML
- Size: 4.87 MB
- Stars: 41
- Watchers: 2
- Forks: 19
- Open Issues: 11
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Swagger
======For Laravel 4, please use the [0.3 branch](https://github.com/Latrell/Swagger/releases/tag/0.3)!
Swagger for Laravel 5
This package combines [swagger-php](https://github.com/zircote/swagger-php) and [swagger-ui](https://github.com/wordnik/swagger-ui) into one Laravel-friendly package.
When you run your app in debug mode, Swagger will scan your Laravel app folder,
generate swagger json files and deposit them to the docs-dir folder (default is "docs").
Files are then served by swagger-ui under the api-docs director.## Installation
```
composer require latrell/swagger dev-master
```Update your packages with ```composer update``` or install with ```composer install```.
## Usage
To use the Swagger Service Provider, you must register the provider when bootstrapping your Laravel application.
There are essentially two ways to do this.Find the `providers` key in `config/app.php` and register the Swagger Service Provider.
```php
'providers' => [
// ...
'Latrell\Swagger\SwaggerServiceProvider',
]
```Run `php artisan vendor:publish` to push swagger-ui to your public folder and publish the config file.
Config file `config/latrell-swagger.php` is the primary way you interact with Swagger.
## Example
* [Demo](http://petstore.swagger.wordnik.com)
* [Documentation](http://zircote.com/swagger-php)