Laravel OperationHow mongodb Inserts a New Record into an Array of Records

  mongodb, question

There is such a document in my label_list table.
图片描述

Now you need to insert a new record in the label column, such as:

{
 "value": "JS"
 }
 
 How to operate in Laravel?  Not found in the document, it seems that the update will replace the whole data in label with this new record, please ask the great god for advice.

This operation is an operation on an array in MongoDB, using the $push operator;

Please refer to the following documents:

https://docs.mongodb.com/manu …

For reference.

Love MongoDB! Have fun!