*/ public function ownedForUser(string $publicId): array { $key = (string) (config('domains.api_key') ?? ''); if ($key === '') { return []; } try { $res = Http::withToken($key) ->acceptJson() ->timeout(10) ->get(rtrim((string) config('domains.api_url'), '/').'/owned-domains', [ 'user' => $publicId, ]); $res->throw(); return collect($res->json('data', [])) ->map(fn ($d) => strtolower(trim((string) $d))) ->filter() ->values() ->all(); } catch (\Throwable $e) { Log::warning('LadillDomainsClient: could not load owned domains', [ 'user' => $publicId, 'error' => $e->getMessage(), ]); return []; } } }