Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在基类或者控制器统一加上@Apidoc\Header("Authorization", require=true, desc="Token") #19

Closed
qq951692996 opened this issue May 23, 2021 · 1 comment

Comments

@qq951692996
Copy link

比如说,我的控制器有很多方法,有什么办法可以不用每个方法都加上
@apidoc\Header("Authorization", require=true, desc="Token")

@HGthecode
Copy link
Owner

你好,可通过config/apidoc.php的配置参数headers,实现所有接口的请求头公共参数,如某些接口不需要全局的参数,可在接口注解处加上特殊参数NotHeaders来让指定接口不自动加上全局参数。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants