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

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

muhamadrezaar/country
=====================

Laravel 5 Country Package

0.0.2(9y ago)024MITPHP

Since Nov 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/julles/laravel-country)[ Packagist](https://packagist.org/packages/muhamadrezaar/country)[ RSS](/packages/muhamadrezaar-country/feed)WikiDiscussions master Synced 4w ago

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

Laravel 5 Country Packages
==========================

[](#laravel-5-country-packages)

[![Total Downloads](https://camo.githubusercontent.com/69761d28202378c6a1f53544cffbd817121e31d620c99ff90626af0f0ecf7c99/68747470733a2f2f706f7365722e707567782e6f72672f6d7568616d616472657a6161722f636f756e7472792f642f746f74616c2e737667)](https://packagist.org/packages/muhamadrezaar/country)[![License](https://camo.githubusercontent.com/c46234e4ee2cd15bb954bb026c0ede341c7e87ebe1c736077554806d4a45f7f5/68747470733a2f2f706f7365722e707567782e6f72672f6d7568616d616472657a6161722f636f756e7472792f6c6963656e73652e737667)](https://packagist.org/packages/muhamadrezaar/country)

Package yang fungsinya untuk mencari data negara diseluruh dunia seperti nama negara , top level domain , ibu kota , benua dll

### Installasi

[](#installasi)

Tambahkan Package pada composer.json

```
composer require muhamadrezaar/country:0.0.2
```

setelah package terdownload , register provider dan facade nya

Provider :

```
MuhamadReza\Country\Provider\CountryProvider::class,
```

Facade :

```
'Country'=>MuhamadReza\Country\Facade\CountryFacade::class,
```

### Cara penggunaaan

[](#cara-penggunaaan)

#### Menampilkan Seluruh data negara

[](#menampilkan-seluruh-data-negara)

```
$countries = Country::getAll();

foreach($countries as $country)
{
		// echo $data->name; Menampilkan nama
		// echo $data->topLevelDomain[0]; Menampilkan domain Notes: array bisa di isi selain 0 , tergantung banyaknya informasi data
		// echo $data->alpha2Code; Menampilkan 2 digit kode
		// echo $data->alpha3Code; Menampilkan 3 digit kode
		// echo $data->callingCodes[0]; Menampilkan kode telpon  Notes: array bisa di isi selain 0 , tergantung banyaknya informasi data
		// echo $data->capital; Menampilkan ibu kota
		// echo $data->altSpellings[0]; Menampilkan ejaan Notes: array bisa di isi selain 0 , tergantung banyaknya informasi data
		// echo $data->region; Menampilkan region atau benua
		// echo $data->subregion; Menampilkan sub region
		// echo $data->translations->ja; menampilkan data nama negara berdasarkan ejaan negara lain tersedia beberapa negara : ->ja,->de,->es,->fr,->it
		// echo $data->population; Menampilkan data populasi
		// echo $data->latlng[0] lattitude
		// echo $data->latlng[1] longitude
		// echo $data->demonym
		// echo $data->area
		// echo $data->gini
		// echo $data->timezones[0] Notes: array bisa di isi selain 0 , tergantung banyaknya informasi data
		// echo $data->nativeName
		// echo $data->numericCode
		// echo $data->currencies[0] Notes: array bisa di isi selain 0 , tergantung banyaknya informasi data
		// echo $data->languages[0] Notes: array bisa di isi selain 0 , tergantung banyaknya informasi data
}
```

#### Filter by Code

[](#filter-by-code)

```
Country::getByCode($code); // 1 or 2 or 3 or Ect
```

#### Filter by Country Code

[](#filter-by-country-code)

```
Country::getByCountryCode($code); // id or ru or de or Ect
```

#### Filter by Currency

[](#filter-by-currency)

```
Country::getByCurrency($currency); // idr or aud or usd or Ect
```

#### Filter by Region

[](#filter-by-region)

```
Country::getByRegion($region); // asia or europe or africa or Ect
```

#### Filter by Capital (Ibu Kota)

[](#filter-by-capital-ibu-kota)

```
Country::getByCapital($capital); // jakarta or mexico city  or Ect
```

#### Filter by Name (Like)

[](#filter-by-name-like)

```
Country::getByName($name); // indo or america  or Ect
```

Ada Pertanyaan ?
----------------

[](#ada-pertanyaan-)

email aja ke :

License
-------

[](#license)

**ENJOY !!!**

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~0 days

Total

2

Last Release

3516d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8998059?v=4)[Muhamad Reza Abdul Rohim](/maintainers/julles)[@julles](https://github.com/julles)

---

Top Contributors

[![julles](https://avatars.githubusercontent.com/u/8998059?v=4)](https://github.com/julles "julles (7 commits)")

### Embed Badge

![Health badge](/badges/muhamadrezaar-country/health.svg)

```
[![Health](https://phpackages.com/badges/muhamadrezaar-country/health.svg)](https://phpackages.com/packages/muhamadrezaar-country)
```

###  Alternatives

[lizhichao/one-sm

国密sm3

1881.5M7](/packages/lizhichao-one-sm)[cinghie/yii2-traits

Yii2 Traits

116.9k8](/packages/cinghie-yii2-traits)

PHPackages © 2026

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