sy / bootstrap-location
Plugin for adding geolocation feature
Requires
- php: >=8.0
- geoip2/geoip2: ^2.13
- sy/bootstrap: ^1.0 || ^2.0 || ^3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
sy/bootstrap plugin for adding IP geolocation service in your sy/project based application.
Installation
From your sy/project application directory:
composer require sy/bootstrap-location
The package ships no template, asset, stylesheet, migration or translation: @sy install
has nothing to copy and no schema to migrate for it.
GeoLite2 databases
The databases are not shipped. Service\Location reads them from inside the package
directory:
vendor/sy/bootstrap-location/geolite2/GeoLite2-Country.mmdb
vendor/sy/bootstrap-location/geolite2/GeoLite2-City.mmdb
Download them from MaxMind and drop them there. A composer install or composer update
that reinstalls the package deletes that directory, so keep a copy outside vendor/ and
restore it after an upgrade. A missing database throws from getCountry() and
getCity(); getCountryIsoCode() and getLatLng() catch that and fall back to ''
and to their $default coordinates (Paris).