'encrypted', 'onboarded_at' => 'datetime', 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; /** * A (única) conta da matriz. */ public static function current(): self { return static::query()->first() ?? new self(); } /** * Chave efetiva da matriz: banco → fallback .env. */ public static function resolveApiKey(): ?string { $key = static::query()->first()?->asaas_api_key; return filled($key) ? $key : config('services.asaas.api_key'); } }