PHPackages                             ayoub-amzil/offline-globe - 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. ayoub-amzil/offline-globe

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

ayoub-amzil/offline-globe
=========================

Offline country data for PHP. Over 200 countries, capitals, flags, languages, currencies. No internet needed.

1.1.5(2y ago)255MITPHP

Since Feb 14Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ayoub-amzil/offline-globe)[ Packagist](https://packagist.org/packages/ayoub-amzil/offline-globe)[ RSS](/packages/ayoub-amzil-offline-globe/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

**Offline Globe**
=================

[](#offline-globe)

Offline country data for PHP Laravel framework. Over 200 countries, capitals, flags, languages, currencies. No internet needed. This packages uses the 7 model continent, and this is a [Reference](https://github.com/ayoub-amzil/offline-globe/blob/main/countries.txt) for all the countries included.

**Installation**
----------------

[](#installation)

```
  cd my-laravel-project
  composer require ayoub-amzil/offline-globe
```

**Usage/Examples**
------------------

[](#usageexamples)

**Import class**

```
use offline\Globe;
```

**Create an instance**

```
$globe = new Globe();
```

**Functions available**

Return an array type value of all countries available

```
$globe->Countries()
```

Return an array type value of African countries

```
$globe->African()
```

Return an array type value of Asian countries

```
$globe->Asian()
```

Return an array type value of Australian countries

```
$globe->Australia()
```

Return an array type value of European countries

```
$globe->Europe()
```

Return an array type value of North America countries

```
$globe->NorthAmerica()
```

Return an array type value of South America countries

```
$globe->SouthAmerica()
```

Return the country code of the given country. The function accept one argument of type string.

```
$globe->Code('Morocco') // MA (return type: string)
```

Return the capital of the given country. The function accept one argument of type string.

```
$globe->Capital('japan') // Tokyo (return type: string)
```

Return the Languages spoken in the given country. The function accept one argument of type string.

```
$globe->Language('jamaica') // ['english', 'jamaican_patois'] (return type: array)
```

Return the currency used in the given country. The function accept one or two arguments

```
// It can take only the country (mandatory)
$globe->Currency('Canada') // ['name' => 'Canadian Dollar', 'code' => 'CAD'] (return type: array)

// Or the country plus one type of information
// name (option)
$globe->Currency('canada','name') // Canadian Dollar (return type: string)
// code (option)
$globe->Currency('canada','code') // CAD (return type: string)
```

Return the flag of the given country. The function accept three arguments. Country, type of the flag, and a directory name where the flags are saved.

```
// country (mandatory)
return view('welcome',
            ['flag'=>$globe->flag('united states')]
        ); //  (return type: string)

// In your template

```

```
// type (option) [default=svg]
return view('welcome',
            ['flag'=>$globe->flag('united states','png')]
        ); //  (return type: string)

// In your template

```

```
// directory name (option) [default=flags]
// PS:  if you want to change your directory name, you have to set the type before
return view('welcome',
            ['flag'=>$globe->flag('united states','png','images')]
        ); //  (return type: string)

// In your template

```

**Authors**
-----------

[](#authors)

[@ayoub-amzil](https://github.com/ayoub-amzil/)

**License**
-----------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

**Contributing**
----------------

[](#contributing)

Contributions are always welcome!

**Acknowledgements**
--------------------

[](#acknowledgements)

- [Flagpedia](https://flagpedia.net/about)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

818d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab1bd32b06c03497ef0ffdb45d966028f4ac38a3b31536b27bcfdda63d604a30?d=identicon)[amzil-ayoub](/maintainers/amzil-ayoub)

---

Top Contributors

[![ayoub-amzil](https://avatars.githubusercontent.com/u/85901966?v=4)](https://github.com/ayoub-amzil "ayoub-amzil (44 commits)")

---

Tags

composerdatainternetlaravelofflinephp

### Embed Badge

![Health badge](/badges/ayoub-amzil-offline-globe/health.svg)

```
[![Health](https://phpackages.com/badges/ayoub-amzil-offline-globe/health.svg)](https://phpackages.com/packages/ayoub-amzil-offline-globe)
```

PHPackages © 2026

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