Appearance
Geo module overview
It’s a simple module that includes different Models (like Country, Continent, Address, Coordinates) and Services (like GeoIPService) that are mostly detached from domain logic.
How to use it (for developers)
Geo system determinates your Country based on IP address. But in some cases, the IP address is from unknown range and the system can't determinate Country. In such cases it uses “Default Country”, which is US by default (as the most popular one for our application). For local development you can change t using GEO_DEFAULT_COUNTRY_ISO_CODE env variable.
Sanctioned countries
As a global business, IxDF has to adhere to international and local legislation from many different countries. It turns out, we are prohibited from conducting businesses with many different countries that are on a list of sanctioned countries. Failure to comply with that legislation might lead to IxDF being banned and even to having its money confiscated in many different countries, including but not limited to the United States.
With this information in the Country model we can also determine whether a local group can be created in a particular country.
How to check if a country is sanctioned?
php
$country->is_sanctionedHow to get a list of non-sanctioned countries on a continent?
php
$continent->getNonSanctionedCountries()Ideas
- Use a composer package for Countries instead of using a DB table (to reduce the number of DB queries and keep a country list up to date)
- For a transition, please always use Country
codeand never use Countryid.
- For a transition, please always use Country