PHPackages                             akavov/yii2-countries - 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. akavov/yii2-countries

ActiveYii2-extension

akavov/yii2-countries
=====================

ISO 3166-1 numeric code, ISO 3166-1 alpha-2 code, ITU-T calling code and name (English, Russian and Ukrainian) for all the countries in the world with their flags

0.9.2.1(9y ago)21.8k3MITPHP

Since Sep 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/aka-VoV/yii2-countries)[ Packagist](https://packagist.org/packages/akavov/yii2-countries)[ RSS](/packages/akavov-yii2-countries/feed)WikiDiscussions master Synced 1mo ago

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

Widget Countries in the world with flags
========================================

[](#widget-countries-in-the-world-with-flags)

ISO 3166-1 numeric code, ISO 3166-1 alpha-2 code, ITU-T calling code and name (English, Russian and Ukrainian) for all the countries in the world with their flags

**Thanks to:**

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist akavov/yii2-countries "*"

```

or add

```
"akavov/yii2-countries": "*"

```

Migration
=========

[](#migration)

you can use migrations that already exist in console/migartions

```
$ yii migrate --migrationPath='@akavov/countries/console/migrations'

```

or

```
$ yii migrate --migrationPath=@vendor/akavov/yii2-countries/console/migrations

```

it will create tables: 1. country - with some data (249 countries in english\[name\_en\]) in it 2. post\_country\_assn - depends from table post and table country

You can use this migartions like an example and create needed tables yourself

Configuring
===========

[](#configuring)

Configure model as follows

```
