Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 10/03/25 in Posts

  1. // Gets only active airlines with active and not owned flights (of 3rd party addons) public function airlines(Request $request): JsonResponse { $airlines = Airline::withCount(['flights' => function ($query) { $query->whereNull('owner_id')->whereNull('user_id')->where('active', 1); }])->where('active', 1)->having('flights_count', '>', 0)->orderBy('icao')->get(); return response()->json(['data' => $airlines]); } Similar approach regarding checking owner_id and user_id of flights can be applied to other parts of the code too.
    1 point
  2. Hi William, As I wrote before, many thanks for the module... I just have a suggestion, like not listing airlines without flights in the dropdown. As the map focuses on destinations of airlines we have, a training airline, or a historic one without scheduled flights should not be there Also, if the map is getting all flights, including 3rd party module owned flights, it may be risky (as they may be not available to the pilot inspecting the map) I will work on these suggestions on my end and can share the controller with you later if you wish to implement too. Safe flights
    1 point
×
×
  • Create New...