null, ]; public const URL = 'https://avwx.rest/api/metar/'; /** * Attempt to get the data from the CheckWX API */ public function run() { /** * @var \App\Contracts\Metar */ $klass = config('phpvms.metar'); $metar_class = new $klass(); $metar = null; $wind = null; $raw_metar = $metar_class->get_metar($this->config['icao']); if ($raw_metar && $raw_metar !== '') { $metar = new Metar($raw_metar); } return view('widgets.weather', [ 'config' => $this->config, 'metar' => $metar, 'unit_alt' => setting('units.altitude'), 'unit_dist' => setting('units.distance'), 'unit_temp' => setting('units.temperature'), ]); } }