讨论数量:
错误信息已经给你答案了:
The response content 必须是
string
或者object implementing __toSting()
,不能返回Boolean
类型。
上面注释也说了 有效的类型 strings, numbers, null, and objects that implement a __toString() method.
@jltxwesley 是这样 我们是api接口开发 我使用中间件拦截Controller 返回值 一般啊 不是查询接口 我习惯 返回Boolean类型 告诉前端 操作成功失败 当然 Integer 也可以 但是laravel 不允许返回Boolean
推荐文章: