0
方法“布尔”:响应内容必须是字符串或对象实施__toString()给出
public function users(){
$users = User::with(['profile'])->customer()->get();
return Response::json($users);
}
响应:
响应内容必须是字符串或对象实施__toString(),给出“布尔”。
* @return $this
*
* @throws \UnexpectedValueException
*/
public function setContent($content)
{
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content)));
}
什么即时做错了?我读过一些类似的问题,但我无法找到错误或任何解决方案。
此致敬礼!
即时通讯使用laravel 4.2 – uruapanmexicansong
什么时候你dd($用户)之前返回什么? – MMMTroy
你想收到什么? – milo526