Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
resolve pilots ivao
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcaussades committed Apr 14, 2024
1 parent a76c9ad commit a50bfee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Http/Controllers/PilotIvaoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ public function getApideparturePilot($icao)
$api = $this->whazzup();
$count = $api["connections"]["pilot"];
$pilot = $api["clients"]["pilots"];
//dd($pilot[0]["flightPlan"]["departureId"]);
$pilotDeparture = [];
for ($i = 0; $i <= $count; $i++) {
foreach ($pilot as $key => $value) {
foreach ($pilot as $i => $value) {
if ($value["flightPlan"]["departureId"] == $icao) {
array_push($pilotDeparture, $value);
}
Expand All @@ -39,7 +40,7 @@ public function getApiArrivalPilot($icao)
$pilot = $api["clients"]["pilots"];
$PilotArrival = [];
for ($i = 0; $i <= $count; $i++) {
foreach ($pilot as $key => $value) {
foreach ($pilot as $i => $value) {
if ($value["flightPlan"]["arrivalId"] == $icao) {
array_push($PilotArrival, $value);
}
Expand Down

0 comments on commit a50bfee

Please sign in to comment.