We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
foreach ($event->volunteers as $key => $volunteer) { if ($volunteer['user_id'] == $userId) { $event->where('volunteers.user_id', intval($userId)) ->unset("volunteers.$key"); } }
Here is my DB structure
"volunteers" : [ null, { "user_id" : NumberInt(1), "name" : "Prafful Panwar", "skills" : [ "Plumber" ], "incentives" : { "tshirt_size" : "XXL" }, "ready_to_contribute_min_amount" : "Yes", "attendance_status" : false } ],
The text was updated successfully, but these errors were encountered:
Up!
Sorry, something went wrong.
@prafful-panwar try to use $pull instead of $unset.
$pull
$unset
Fixed by #2578
Model::unset
No branches or pull requests
Here is my DB structure
The text was updated successfully, but these errors were encountered: