laravel-mongodb icon indicating copy to clipboard operation
laravel-mongodb copied to clipboard

Upsert with Push

Open otherperspectives opened this issue 3 years ago • 3 comments

Hi there,

I am trying to achieve an upsert with push. Basically, I am saving the number of likes from a YouTube post. If the record already exists, I would like to push to an array called 'history'; otherwise, I would like to create the record with all the post details.

Does anyone have any idea how I can achieve this?

otherperspectives avatar Feb 14 '22 15:02 otherperspectives

Screenshot 2022-02-17 at 2 25 57 PM

otherperspectives avatar Feb 17 '22 14:02 otherperspectives

This is a similar thing that I want to achieve.

otherperspectives avatar Feb 17 '22 14:02 otherperspectives

bump for this.

Gabsys avatar May 22 '22 14:05 Gabsys