Fix bug in fillable array#33
Conversation
This bug prevented the country_id and state_id fields from being mass-assignable when updating a user.
|
Hmm, not quite. October's Model is slightly different to Laravel, If you set the relation to the primary identifier, it will populate the relation. So for example: If this is a bug, please provide some example code where it doesn't work. |
|
I was trying to use the country_state partial of the account component on my front-end for users to update their account info (ended up using custom code for country and state dropdowns, as I think there might be an issue with the partial, or I'm using it wrong, see here: http://octobercms.com/forum/post/country-state-relation-doesnt-work-into-users-account-page). I followed the model you provide in the update partial. So something like this: Before I changed country to country_id in the fillable array, that form would update everything but country_id in the database. The country_state partial also references country_id and state_id so I think it might have the same problem. |
This bug prevented the country_id and state_id fields from being
mass-assignable when updating a user.