scheduled) { $extra = '(scheduled)'; } else { $extra = '(manual)'; } $this->info('Last speedtest run at: ' . $latest->created_at . ' ' . $extra); if($latest->failed) { $this->error('Speedtest failed'); } else { $this->info('Ping: ' . $latest->ping . ' ms'); $this->info('Download: ' . $latest->download . ' Mbit/s'); $this->info('Upload: ' . $latest->upload . ' Mbit/s'); } } else { $this->info('No speedtests have been run yet.'); $this->info('Running speedtest, this might take a while...'); $results = SpeedtestHelper::runSpeedtest(); $this->info('Ping: ' . $results->ping . ' ms'); $this->info('Download: ' . $results->download . ' Mbit/s'); $this->info('Upload: ' . $results->upload . ' Mbit/s'); } } }