Closed devjk1 closed 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.
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
I am adding these classes to the support config here:
@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.
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