PHPackages                             freshmindpl/geolite2-city - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. freshmindpl/geolite2-city

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

freshmindpl/geolite2-city
=========================

Composer-packaged version of the free MaxMind GeoLite2 City database.

0.2.0(6y ago)15171MITPHPPHP &gt;=5.4

Since Jul 15Pushed 6y agoCompare

[ Source](https://github.com/freshmindpl/geolite2-city)[ Packagist](https://packagist.org/packages/freshmindpl/geolite2-city)[ RSS](/packages/freshmindpl-geolite2-city/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Bright Nucleus GeoLite2 City Database
=====================================

[](#bright-nucleus-geolite2-city-database)

This is a Composer plugin that provides an automated binary version of the free MaxMind GeoLite2 City database.

The main advantage is that the downloaded database will be checked for updates on each `composer install` and `composer update`.

Table Of Contents
-----------------

[](#table-of-contents)

- [Attribution](#attribution)
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Example](#example)
- [Contributing](#contributing)
- [License](#license)

Attribution
-----------

[](#attribution)

This product includes GeoLite2 data created by MaxMind, available from [](http://www.maxmind.com).

Installation
------------

[](#installation)

The only thing you need to do to make this work is adding this package as a dependency to your project:

```
composer require freshmindpl/geolite2-city
```

Basic Usage
-----------

[](#basic-usage)

On each `composer install` or `composer update`, a check will be made to see whether there's a new version of the database available. If there is, that new version is downloaded.

To retrieve the path to the binary database file from within your project, you can use the `Database::getLocation()` method:

```
