我在我的应用中设置了谷歌分析,用于构建仪表板。当我dd();
我在
当我运行此代码时:
@foreach($datas as $data)
@foreach($data as $dat)
{{$dat}}
@endforeach
@endforeach
它提供单行收集的所有数据。当我跑:
@foreach($datas as $data)
@foreach($data as $dat)
{{$dat->pageViews}}
@endforeach
@endforeach
抛出错误Unknown getter 'pageViews'
答案 0 :(得分:1)
而不是使用你的循环
@foreach($datas as $data)
@foreach($data as $dat)
{{$dat->pageViews}}
@endforeach
@endforeach
你必须使用它
@foreach($datas as $data)
@foreach($data as $dat)
{{$dat['pageViews']}}
@endforeach
@endforeach