function show(ATC $controller) { if (!is_null($controller->airport_id) && $controller->facility_id >= 2 && $controller->facility_id <= 5) { $otherControllers = ATC::whereAirportId($controller->airport_id)->whereNull('end')->where('facility_id', '<', $controller->facility_id)->orderBy('facility_id', 'desc')->pluck('facility_id'); $otherControllers = range(max(2, $otherControllers + 1), $controller->facility_id); } else { $otherControllers = array(); } if ($controller->pilot->getOriginal('updated_at') == '0000-00-00 00:00:00') { Queue::push('LegacyUpdate', $controller->pilot->vatsim_id, 'legacy'); $controller->pilot->processing = 2; $controller->pilot->save(); } $this->autoRender(compact('controller', 'otherControllers'), $controller->callsign); }