diff --git a/src/services/SightingSrv.php b/src/services/SightingSrv.php index e02d2c60f63f554882ebbaa6db88ba17fcf842f7..b9830ed314fbd93cef201614fe987edaf62d3b53 100644 --- a/src/services/SightingSrv.php +++ b/src/services/SightingSrv.php @@ -51,11 +51,15 @@ class SightingSrv extends BaseSrv // } // } $sightings = []; - foreach ($res as $re) { - foreach ($re as $r) { - $sighting = new SightingModel(); - $sightings[] = $sighting->constructFromArray($r); - } +// echo $res; + foreach ($res['result'] as $re) { + $sighting = new SightingModel(); + $sightings[] = $sighting->constructFromArray($re); +// echo $re; +// echo "<br>"; +// foreach ($re as $r) { +// +// } } return ["result" => $sightings, "count" => $res["count"]]; }