PHP code example of leruge / tp6-doc
1. Go to this page and download the library: Download leruge/tp6-doc library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
leruge / tp6-doc example snippets
composer
return [
// 文档标准
'swagger' => '2.0', // 目前仅支持2.0
'title' => '文档名称',
'version' => '1.0.1',
'debug' => true, // 打开调式模式则每次都生成一次文档
// code字段标识含义
'code_desc' => [
1 => '请求成功',
0 => '请求失败'
],
// 需要生成文档的控制
'controller' => [
\app\controller\Foo::class,
],
];