getAliasByName(strtolower(trim($name))); $type = 'Available'; $typeColour = '#34d399'; if ($alias) { $comment = $alias['comment'] ?? ''; if (str_contains($comment, 'type=reserved')) { $type = 'Reserved'; $typeColour = '#fbbf24'; } elseif (str_contains($comment, 'type=gateway')) { $type = 'Gateway'; $typeColour = '#34d399'; } else { $type = 'Registered'; $typeColour = '#818cf8'; } } $escapedName = htmlspecialchars($name, ENT_XML1); $svg = << {$escapedName}.lthn {$type} Blockchain domain name on the Lethean network lthn.io Lethean CIC SVG; return response($svg, 200)->header('Content-Type', 'image/svg+xml') ->header('Cache-Control', 'public, max-age=3600'); } }