答案 0 :(得分:1)
您可以像这样使用bodyParam
批注:
/**
* Database authentication
*
* @bodyParam email string required Email address.
* @bodyParam password string required Users password.
* @param UserAuthenticationRequest $request
* @return JsonResponse
* @response JsonResponse
* @throws AuthenticationException
*/
public function authenticate(UserAuthenticationRequest $request): JsonResponse {
...
}
有关更多信息,请阅读laravel apidoc generator docs