PHPackages                             brightnucleus/country-codes - 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. brightnucleus/country-codes

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

brightnucleus/country-codes
===========================

Automatically updated country data containing ISO codes and English country names, powered by free MaxMind data.

v0.3.2(5y ago)1886.5k24[7 issues](https://github.com/brightnucleus/country-codes/issues)[4 PRs](https://github.com/brightnucleus/country-codes/pulls)MITPHPPHP &gt;=5.4

Since Mar 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/brightnucleus/country-codes)[ Packagist](https://packagist.org/packages/brightnucleus/country-codes)[ RSS](/packages/brightnucleus-country-codes/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (10)Used By (0)

Bright Nucleus Country Codes Database
=====================================

[](#bright-nucleus-country-codes-database)

[![Latest Stable Version](https://camo.githubusercontent.com/3578b3ab7944810f215256a137c8a23e99992b6cc3f2f279428721ee92146086/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f636f756e7472792d636f6465732f762f737461626c65)](https://packagist.org/packages/brightnucleus/country-codes)[![Total Downloads](https://camo.githubusercontent.com/091c5c1f6bd74349b64cacd6f04423f6de2fbaef267d2d757b21c2cd91a52703/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f636f756e7472792d636f6465732f646f776e6c6f616473)](https://packagist.org/packages/brightnucleus/country-codes)[![Latest Unstable Version](https://camo.githubusercontent.com/e143d0632e741cf3e1aab9526d37b952a17542cc90490e3d92c8cac500a7d297/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f636f756e7472792d636f6465732f762f756e737461626c65)](https://packagist.org/packages/brightnucleus/country-codes)[![License](https://camo.githubusercontent.com/f28095b6377b97345ca8d2b9855359068b7a7e289553fe9ddecc2c58a4a344fc/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f636f756e7472792d636f6465732f6c6963656e7365)](https://packagist.org/packages/brightnucleus/country-codes)

This is a Composer plugin that provides an automated version of the free MaxMind GeoLite CSV Country Codes 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)
- [Contributing](#contributing)
- [License](#license)

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

[](#attribution)

This product includes GeoLite Legacy 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 brightnucleus/country-codes
```

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.

Usage is pretty straight-forward. Just use one of the two provided static methods:

```
