You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
620 B
35 lines
620 B
1 year ago
|
<?php
|
||
|
|
||
|
namespace Plugins\ApiDoc\Admin\Controller;
|
||
|
|
||
|
use App\Common\Util\Response;
|
||
|
use Plugins\ApiDoc\Admin\Service\ApiDocService;
|
||
|
|
||
|
/**
|
||
|
* 文档控制器
|
||
|
*
|
||
|
* Class DocumentController
|
||
|
*/
|
||
|
class DocumentController
|
||
|
{
|
||
|
/**
|
||
|
* @return string
|
||
|
*/
|
||
|
public function view(): string
|
||
|
{
|
||
|
return Response::render("plugins/ApiDoc/Document/view");
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 文档数据
|
||
|
*
|
||
|
* @return \think\Response
|
||
|
* @throws \Exception
|
||
|
*/
|
||
|
public function doc(): \think\Response
|
||
|
{
|
||
|
return Response::json()->success(
|
||
|
ApiDocService::aop(false)->get()
|
||
|
);
|
||
|
}
|
||
|
}
|