Download the PHP package iwanli/laravel5-swagger without Composer

On this page you can find all versions of the php package iwanli/laravel5-swagger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel5-swagger

laravel5-swagger

基于 slampenny/Swaggervel 实现的 swagger API文档,更新 swagger UI 到最新版本,支持多语言设置。

Swagger 2

本扩展使用的是 Swagger UI 2.1.4 版本

OAuth2

关于 OAuth2 的现在还未测试使用,后期会进行测试更新。。。

安装

默认的访问路由

  1. json格式访问地址:www.example.com/docs
  2. swagger UI 访问地址:www.example.com/api/docs

配置文件

在执行 php artisan vendor:publish 成功后,会生成 config/swagger.php 的配置文件,配置文件内容如下:

这里我默认是中文的,大部分情况下,大家可以不用修改配置,默认即可。

简单的使用

控制器中使用

模型中使用

本扩展会自动监听app目录下面的所有控制器(controller)和模型(model)注释张带有@SWG的标签并解析,这里的示例我只是简单的先贴上别人的代码,后期我会将这些命令和界面全部放在个人的阿里云上,方便大家学习。

另外我在扩展里目录添加了一个 Examples 目录,大家可以参照这个例子,动动手在本地试试,网上的预览地址:http://petstore.swagger.io/ ,关于更多的参数命令:http://swagger.io/specification/ ,本人也在深入研究中。大家可以互相交流讨论。

如果有上面错误或bug,欢迎反馈~ 创建一个 Issues 或邮件反馈 [email protected]


All versions of laravel5-swagger with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
zircote/swagger-php Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package iwanli/laravel5-swagger contains the following files

Loading the files please wait ....