PHP code example of lake / lake-admin-addon-lapi
1. Go to this page and download the library: Download lake/lake-admin-addon-lapi 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/ */
lake / lake-admin-addon-lapi example snippets
namespace app\api\controller;
/**
* @title 接口标题[必需]
* @description 接口描述
*/
class Index
{
/**
* 接口方法
*
* @title 接口方法标题[必需]
* @method GET[必需]
* @request {"a":"c"}
* @response {"d":"e"}
* @description 接口方法描述
* @listorder 100
* @status 1
*/
public function index()
{
return json([
'code' => 0,
'msg' => 'hello world!',
'data' => 'api data',
]);
}