PHPackages                             bkfdev/laravel-world - 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. bkfdev/laravel-world

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bkfdev/laravel-world
====================

:package\_description

v3.0.5(2y ago)0451MITPHP

Since May 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aeq-dev/laravel-world)[ Packagist](https://packagist.org/packages/bkfdev/laravel-world)[ Docs](https://github.com/bkfdev/laravel-world)[ RSS](/packages/bkfdev-laravel-world/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)DependenciesVersions (21)Used By (1)

LaravelWorld
============

[](#laravelworld)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d0f00d9d302a1325c3f09c2cfc69455b7b2363b9a80cccdab97581178a44e446/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626b666465762f6c61726176656c2d776f726c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bkfdev/laravel-world)[![Total Downloads](https://camo.githubusercontent.com/88c7344b3d8bc2885c36b060a8b121bfd64ded5f81609e9643a617a00b13da11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626b666465762f6c61726176656c2d776f726c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bkfdev/laravel-world)[![Build Status](https://camo.githubusercontent.com/7cf51609ef35a64d7d55ff86f570d4dd0935a9366402ab265539dbbd9388d3c8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626b666465762f6c61726176656c2d776f726c642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bkfdev/laravel-world)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

The Laravel-World is a Laravel package which provides a list of the countries, states, cities, timezones, currencies and languages.

It can be consumed with the World Facade

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

[](#installation)

Via Composer

```
    composer require bkfdev/laravel-world
```

Publish
-------

[](#publish)

```
    php artisan vendor:publish --force --provider="Bkfdev\World\LaravelWorldServiceProvider"
```

Setup Config
------------

[](#setup-config)

```
 [],

    /*
	|--------------------------------------------------------------------------
	| Disallowed countries to not be loaded
	| Leave it empty to allow all countries to be loaded
	|--------------------------------------------------------------------------
	*/
    'disallowed_countries' => [],

    /*
	|--------------------------------------------------------------------------
	| Supported locales.
	|--------------------------------------------------------------------------
	*/
    'accepted_locales' => [
        'ar',
        'en',
        /* 'bn',
        'br',
        'de',
        'es',
        'fr',
        'ja',
        'kr',
        'nl',
        'pl',
        'pt',
        'ro',
        'ru',
        'zh', */
    ],
    /*
	|--------------------------------------------------------------------------
	| Enabled modules.
	| The cities module depends on the states module.
	|--------------------------------------------------------------------------
	*/
    'modules' => [
        'states' => true,
        'cities' => true,
        'timezones' => true,
        'currencies' => true,
        'languages' => true,
    ],

    /*
	|--------------------------------------------------------------------------
	| Migrations.
	|--------------------------------------------------------------------------
	*/
    'migrations' => [
        'countries' => [
            'table_name' => 'world_countries',
            'optional_fields' => [

    ...
```

Migrate
-------

[](#migrate)

```
    php artisan migrate
```

Run Command to import data
--------------------------

[](#run-command-to-import-data)

```
    php artisan world:init
```

Or you may add some countries by running this command :

```
    php artisan world:add us sa dz
```

Usage
-----

[](#usage)

It's just an eloquent so you may run whetever your want

```
    use Bkfdev\World\World;
```

###### Get All countries :

[](#get-all-countries-)

```
    $countries = World::Countries();
```

###### Get country by code iso2 or iso3 :

[](#get-country-by-code-iso2-or-iso3-)

```
    $country = World::getCountryByCode($code);
    return :
    [
        "id" => 1
        "iso2" => "DZ"
        "name" => "Algeria"
        "status" => 1
        "phone_code" => "213"
        "iso3" => "DZA"
        "native" => "الجزائر"
        "region" => "Africa"
        "subregion" => "Northern Africa"
        "latitude" => "28.00000000"
        "longitude" => "3.00000000"
        "emoji" => "🇩🇿"
        "emojiU" => "U+1F1E9 U+1F1FF"
    ]
```

###### Get country by name :

[](#get-country-by-name-)

```
    $country = World::getCountryByName($name);
```

###### Get states of a give country by code :

[](#get-states-of-a-give-country-by-code-)

```
    $states = World::getStatesOfCountry($code);
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
    composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Author Name](https://github.com/bkfdev)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Total

20

Last Release

759d ago

Major Versions

0.0.9 → 1.0.02022-05-24

1.0.1 → 2.02023-09-02

v2.2 → v3.02023-11-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d2469c45f2a6b752194eb41838268b9d199232d364f18be8597cd3c1da9c5e7?d=identicon)[aeq-dev](/maintainers/aeq-dev)

---

Top Contributors

[![aeq-dev](https://avatars.githubusercontent.com/u/81385994?v=4)](https://github.com/aeq-dev "aeq-dev (25 commits)")

---

Tags

laravelcountriesworldstatescurrenciescitiesLaravel-World

### Embed Badge

![Health badge](/badges/bkfdev-laravel-world/health.svg)

```
[![Health](https://phpackages.com/badges/bkfdev-laravel-world/health.svg)](https://phpackages.com/packages/bkfdev-laravel-world)
```

###  Alternatives

[pragmarx/countries

PHP Countries and Currencies

1.9k3.4M24](/packages/pragmarx-countries)[pragmarx/countries-laravel

Countries for Laravel

1491.1M2](/packages/pragmarx-countries-laravel)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8231.5k1](/packages/dipeshsukhia-laravel-country-state-city-data)[altwaireb/laravel-world

Laravel World, Countries States Cities DB Migration &amp; Seeder

10012.1k](/packages/altwaireb-laravel-world)[usamamuneerchaudhary/country-city-state

Country City State Data Provider for Laravel 12+

242.7k](/packages/usamamuneerchaudhary-country-city-state)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
