I am working on APIs in the Yii2 framework where I have to provide API where names of all countries, states, and cities must be provided. Everyone kindly helps me with the logic i.e. should I go for the additional tables in the database or use another third-party package. Give me an idea about the logic and if you know any updated package then let me know.
            Asked
            
        
        
            Active
            
        
            Viewed 399 times
        
    1 Answers
0
            
            
        Maybe this link can help you http://www.unece.org/cefact/locode/welcome.html This link is from this answer https://stackoverflow.com/a/20647380
About the logic it depends of what do you want to do with the info, e.g. if there can be different combinations of Country-State-City I think the better approach is 3 related tables. But again, that depends on your requirement
        Diego Guerrero
        
- 33
 - 1
 - 8