muhamadrezaar/country
Larablocks Analysis
muhamadrezaar/country works with any PHP project: the latest release (0.0.2, Nov 12, 2016) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- No release in the last 12 months (last: Nov 12, 2016)
- 0 downloads a month (needs 10,000)
- 0 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Nov 12, 2016.
- No releases in the last 12 months.
- First released: Nov 12, 2016.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.
| Install | |
|---|---|
composer require muhamadrezaar/country |
|
| Latest Version: | 0.0.2 |
| License: | MIT |
| Last Updated: | Nov 12, 2016 |
| Links: | GitHub · Packagist |
Laravel 5 Country Packages
Package yang fungsinya untuk mencari data negara diseluruh dunia seperti nama negara , top level domain , ibu kota , benua dll
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
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
Country::getByCode($code); // 1 or 2 or 3 or Ect
Filter by Country Code
Country::getByCountryCode($code); // id or ru or de or Ect
Filter by Currency
Country::getByCurrency($currency); // idr or aud or usd or Ect
Filter by Region
Country::getByRegion($region); // asia or europe or africa or Ect
Filter by Capital (Ibu Kota)
Country::getByCapital($capital); // jakarta or mexico city or Ect
Filter by Name (Like)
Country::getByName($name); // indo or america or Ect
Ada Pertanyaan ?
email aja ke : reza.wikrama3@gmail.com
License
ENJOY !!!
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | License |
|---|---|---|
| 0.0.2 | MIT | |
| 0.0.1 | MIT |