Skip to content
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

UserAddress : why "type" is required #142

Open
PubliAlex opened this issue Feb 28, 2021 · 0 comments
Open

UserAddress : why "type" is required #142

PubliAlex opened this issue Feb 28, 2021 · 0 comments
Assignees

Comments

@PubliAlex
Copy link

PubliAlex commented 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 :

  • 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,

@PubliAlex PubliAlex changed the title UserAddress : Can't update boolean columns UserAddress : why "type" is required Feb 28, 2021
@lautsevich lautsevich self-assigned this Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants