'ok', 'time' => gmdate('c')]; try { db()->query('SELECT 1'); $status['database'] = 'ok'; } catch (Throwable $e) { http_response_code(500); $status['status'] = 'error'; $status['database'] = 'error'; } echo json_encode($status, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);