-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to $push documents to array #41
Comments
jenssegers
added a commit
that referenced
this issue
Sep 17, 2013
I added an example to the readme for your question:
|
This was referenced Nov 26, 2018
3 tasks
mnphpexpert
added a commit
to mnphpexpert/laravel-mongodb
that referenced
this issue
Sep 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a collection called "Contracts" with a field called "projects", which is an array of documents. Each document in the array would have an _id (a MongoID) and a 'projectName' (a string). I'm attempting to use the "push" function to append this array, but I cannot figure out how to add documents.
The above code doesn't work, and I'm not sure how to do exactly what I'm trying to do. In addition, where I'm concatenating the $projectId, I really want that to be a new ObjectId.
How could I do this?
Thanks!
The text was updated successfully, but these errors were encountered: