damian-nz/l5-swagger
Composer 安装命令:
composer require damian-nz/l5-swagger
包简介
Swagger integration to Laravel 5
README 文档
README
Swagger 2.0 for Laravel >=5.1
This package is a wrapper of Swagger-php and swagger-ui adapted to work with Laravel 5.
Full credit to DarkaOnLine/L5-Swagger for creating this package originally.
Installation
composer require "damian-nz/l5-swagger:~4.0"
Thanks to package auto discovery in Laravel 5.5, that's it!
Migrate from 3.0 to 4.0
- Remove
config/l5-swagger.phpfile (make a copy if needed) - Remove
public/vendor/l5-swaggerdirectory - Remove
resources/views/vendor/l5-swaggerdirectory - Run
l5-swagger:publishto publish new swagger-ui view and configuration - Edit the newly published
config/l5-swagger.phpfile
Configuration
- Run
l5-swagger:publishto publish everything - Run
l5-swagger:publish-configto publish configs (config/l5-swagger.php) - Run
l5-swagger:publish-assetsto publish swagger-ui to your public folder (public/vendor/l5-swagger) - Run
l5-swagger:publish-viewsto publish views (resources/views/vendor/l5-swagger) - only for versions <= 4.0 - Run
l5-swagger:generateto generate docs or setgenerate_alwaysparam totruein your config or .env file
Swagger-php
The actual Swagger spec is beyond the scope of this package. All L5-Swagger does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php look here. For good examples of swagger-php in action look here.
Support on Beerpay
Help me out the original package creator buy a round of 🍻!
统计信息
- 总下载量: 4.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-01