But when I try to output the result in a blade view page doing a diedump it returns an empty array [] while I know for certain it should return at least ONE result of an active stream.
foreach($cong as $gemeente)
{
....
$data = $data->incomingStreams;
...
}
On each loop, aren't you just erasing the previous $data and overriding it to be the latest incoming stream? Is it possible that the last incoming stream is just an empty array?
@thomaskim : True. Didn't think of it that way. All I want is the complete list. I know when a stream is not connected it will return an empty array (in JSON) but I also know that when there IS an active stream it will return an array ($data) where I want to get the "incomingStreams".
Cant really help you on that as I don't have your data. Try doing a dd($data) just before loading the view and see what it holds. You should be able to troubleshoot it from there. I was going off your original example.