Geo for Laravel
Installation
Installation
composer require cboxdk/laravel-geo
The GeoServiceProvider is auto-discovered. It:
- merges
config/geo.php(only key:locale, for display names); - binds
Contracts\JurisdictionRepositoryas a singleton to the addressing-backedAddressingJurisdictionRepository.
Publish the config if you want to change the reference locale:
php artisan vendor:publish --tag=geo-config
Resolve the repository from the container:
$geo = app(\Cbox\Geo\Contracts\JurisdictionRepository::class);