PHP code example of mengcc / mcc-doc

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

    

mengcc / mcc-doc example snippets



class UserController{

    /**
    * @MccDoc({
    * "name":"获取用户信息",
    * "url":"/api/user/info",
    * "method":"GET",
    * "description":"获取用户信息",
    * })@
    */
    public function info(){}
    
    /**
    * @MccDoc({
    * "name":"编辑用户",
    * "url":"/api/user/edit",
    * "method":"POST",
    * "description":"编辑用户",
    * "params":{
    *    "name":"小明",
    *    "age":20
    *  },
    * })@
    */
    public function edit(){}
}

/**
* @MccDoc({
* "name":"接口名称",
* "url":"接口地址",
* "method":"请求方式",
* "description":"描述",
* "params":{
*    "order_ids":"订单id集合"
*  },
* })@
*/