TIPOFF / addresses

Laravel Package to manage addresses & interact with Address API
MIT License
0 stars 2 forks source link

Phone #58 [TGER-111] #64

Closed devjk1 closed 3 years ago

devjk1 commented 3 years ago

58

Note: There is a format called E.164, varchar(15) https://www.twilio.com/docs/glossary/what-e164 For Validation and Formatting, we can use Twilio if we use E.164 https://www.twilio.com/docs/lookup

drewroberts commented 3 years ago

I need to think about this model a little more and decide what all it needs. I'm still in the brainstorming phase on it.

devjk1 commented 3 years ago

Note: Model CountryCallingcode $table->foreignIdFor(app('country')); // Some countries have more than one Calling Code Instead of Country hasMany CountryCallingcode, I used CountryCallingcode hasMany Country, e.g. +1 for USA, Canada

drewroberts commented 3 years ago

I am adding these classes to the support config here:

drewroberts commented 3 years ago

@devjk1 It's the other way around from your comment:

Note: Model CountryCallingcode $table->foreignIdFor(app('country')); // Some countries have more than one Calling Code Instead of Country hasMany CountryCallingcode, I used CountryCallingcode hasMany Country, e.g. +1 for USA, Canada

A country calling code can only belong to 1 country, but some countries have multiple country calling codes. List here:

Dominican Republic is an example.