0
我从我的控制器向我的视图发送变量response
。laravel刀片模板中的FatalErrorException
所以在我看来,如果我这样做:
{{response}}
我能看到的响应,所以它的存在。
然而这response
是一个JSON格式字符串,所以我需要解析它,
我想这样做的刀片。
我想这
<!DOCTYPE html>
<html>
<head>
<title>Master Response</title>
</head>
<body>
{{
$json_a = json_decode($response, true);
$hits = $json_a['hits']['hits'];
}}
</body>
</html>
,但我得到这个错误
Whoops, looks like something went wrong.
1/1
FatalErrorException in 95df32e49f76c09bb366fa2eba52e460d30085dd.php line 7:
parse error
in 95df32e49f76c09bb366fa2eba52e460d30085dd.php line 7