PHP code example of ruanjiajia / yii2_apidoc

1. Go to this page and download the library: Download ruanjiajia/yii2_apidoc 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/ */

    

ruanjiajia / yii2_apidoc example snippets


'modules' => [
        'route'=>[
            'class'=>'Route\Module',
            'ignore'=>['api'],
        ],
    ]

'modules' => [
        'route'=>[
            'class'=>'Route\Module',
            'ignore'=>['api'],
            'show_modules'=>'api'
        ],
    ]

 /**
     * api文档接口怎么生成?
     * @param string $version api版本
     * @param string $sign 签名
     * @param string $page 用于分页 最小是1
     * @desc 这个是描述哦
     * @method POST
     * @return string msg 消息解释
     * @return int code 0表示正确
     */
    public function actionIndex(){
    }