run(); HealthRun::create(['status' => $result['status'], 'results' => $result, 'ran_at' => now()]); if ($this->option('json')) { $this->line(json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { $this->table(['Check', 'Status', 'Message'], collect($result['checks'])->map(fn (array $check) => [$check['name'], $check['status'], $check['message']])->all()); $this->line('Overall: '.$result['status']); } return $result['status'] === 'failed' ? self::FAILURE : self::SUCCESS; } }