How to unset/remove document field?

I wanted to update a document entry and remove one field. Tried using unset($object->field). It is removed when printing $object->toArray() but the field is not actually removed on save. How should it be done?

你的问题描述的不是很明白呀, 你想在修改后剔除某个字段吗?

yes

你的问题描述的不是很明白呀, 你想在修改后剔除某个字段吗?

yes

你的问题描述的不是很明白呀, 你想在修改后剔除某个字段吗?

Then you can refer to laravel's Transformers

thank you.

yes

你的问题描述的不是很明白呀, 你想在修改后剔除某个字段吗?

Then you can refer to laravel's Transformers