1. Go to this page and download the library: Download xianrenqh/apidoc2-webman 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/ */
xianrenqh / apidoc2-webman example snippets
namespace app\controller;
use xianrenqh\Apidoc2Webman\annotation as Apidoc;
/**
* 标题也可以这样直接写
* @Apidoc\Title("基础示例")
* @Apidoc\Group("base")
* @Apidoc\Sort(1)
*/
class ApiDocTest
{
//...
}
use xianrenqh\Apidoc2Webman\annotation as Apidoc;
/**
* @Apidoc\Title("基础示例")
*/
class ApiDocTest
{
/**
* @Apidoc\Title("基础的注释方法")
* @Apidoc\Desc("最基础的接口注释写法")
* @Apidoc\Url("/api.html")
* @Apidoc\Method("GET")
* @Apidoc\Author("HG-CODE")
* @Apidoc\Tag("测试")
* @Apidoc\Param("username", type="abc",