Apidoc插件 使用有报错
当我新建 Apidoc基础的演示 将此方法删除就会一直报错
#[
Apidoc\Title("Apidoc基础的演示2"),
Apidoc\Tag("apidoc,基础,示例2"),
Apidoc\Method("GET"),
Apidoc\Url("/api/ApidocTest/index"),
Apidoc\Query(name:"name",type: "string",require: true,desc: "姓名",mock:"@name"),
Apidoc\Query(name:"phone",type: "string",require: true,desc: "手机号",mock:"@phone"),
Apidoc\Returned("id",type: "int",desc: "Id"),
]
public function index2(): void
{
$params = $this->request->get();
$this->success('', [
'title' => "第一个接口",
'name' => $params['name'],
'phone' => $params['phone'],
'content' => "欢迎使用Apidoc",
]);
}
```
`
![](https://cdn.buildadmin.com/storage/default/20240925/image30fba51e8c01b36baddc7967e9597a4aeb97fe77.png)
请先登录
报什么错误呢?
500 没有此接口 找到原因了 删除接口后还停留在当时的接口文档里边 去除url 地址里的路径正常了
- 1
前往