You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder why the "type" field seems required for the UserAddress model, and if I can alter the model to remove it from the $rules array without drawback.
I would like to do that because I don't want to tag an address as "billing" or "shipping" only. I think an address can be both at a time, and so, it should be better to handle that by defining 2 new columns :
is_default_billing (boolean)
is_default_shipping (boolean)
Like that, I can have only one addresse entry, that is my default billing and shipping address (if both boolean are true).
It sounds better to me to handle things like that than the default "type" column.
Best regards,
The text was updated successfully, but these errors were encountered:
PubliAlex
changed the title
UserAddress : Can't update boolean columns
UserAddress : why "type" is required
Feb 28, 2021
Hello,
I wonder why the "type" field seems required for the UserAddress model, and if I can alter the model to remove it from the $rules array without drawback.
I would like to do that because I don't want to tag an address as "billing" or "shipping" only. I think an address can be both at a time, and so, it should be better to handle that by defining 2 new columns :
Like that, I can have only one addresse entry, that is my default billing and shipping address (if both boolean are true).
It sounds better to me to handle things like that than the default "type" column.
Best regards,
The text was updated successfully, but these errors were encountered: