protected function saveSslRecord($domain, $result)
    {
        $record['grade'] = $result['results']['grade'];
        $record['results_url'] = 'https://www.htbridge.com/ssl/?id=' . $result['internals']['short_id'];

        if (isset($result['certificates']['information'][0])) {
            $record['valid'] = $result['certificates']['information'][0]['valid_now'];
            $record['valid_from'] = $result['certificates']['information'][0]['valid_from'];
            $record['valid_to'] = $result['certificates']['information'][0]['valid_to'];
            $record['revoked'] = $result['certificates']['information'][0]['revoked'];
            $record['expires_soon'] = $result['certificates']['information'][0]['expires_soon'];
            $record['issuer'] = $result['certificates']['information'][0]['issuer_cn'];
        }

        try {
            History::where('meta', $domain)->delete();
            History::create(['type' => 'ssl', 'meta' => $domain, 'record' => $record]);
        } catch (Exception $e) {
            $this->eye->logger()->error('Ssl record save failed', $e, $domain);
            throw $e;
        }
    }