The mass assignment doesn't work on nested fillable in the update #2619
Unanswered
BehroozBvk
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I've created PHPORM-89 to track this internally. Please follow that ticket to get updates when we start implementing it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys, I used fillable in my model and it works correctly when creating, and if a new attribute comes in the information that is not in the fillable list, it is not added to the document, but it is not like that in update, and this is annoying.
Is there a solution for it in the package? Or PR should be given?
Model
User.php
demo:
My code for update:
But no update is done in this way. :(
Now, if we do this using the code below, the update will be done, but we will lose the mass assignment feature, and a field that is not in the fillable list, such as test, will be added to the document.And also other fields are removed from the document and this is disastrous.
Beta Was this translation helpful? Give feedback.
All reactions