diff --git a/app/Console/Commands/CheckOnlineControllers.php b/app/Console/Commands/CheckOnlineControllers.php index 965cd1443..d2ae25f96 100644 --- a/app/Console/Commands/CheckOnlineControllers.php +++ b/app/Console/Commands/CheckOnlineControllers.php @@ -44,7 +44,9 @@ public function handle() } // Fetch which first four characters from ICAOs should look for based on positions database - $areasRaw = DB::raw('SELECT DISTINCT LEFT(callsign, 4) as prefix FROM positions;'); + $areasRaw = DB::table('positions') + ->select(DB::raw('DISTINCT LEFT(callsign, 4) as prefix')) + ->get(); $areas = collect(); foreach ($areasRaw as $a) {