Download the PHP package coolsam/laravel-mongodb-world without Composer
On this page you can find all versions of the php package coolsam/laravel-mongodb-world. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-mongodb-world
Laravel World Database for Laravel-MongoDB
This package focused on World Countries, Regions, and Cities database with locale support for Laravel using the Laravel-MongoDB package by Jenssegers.
Conceptions
There are 5 main objects in this package.
- World: the earth world.
- Continent: 7 continent
- Country: 247 countries
- Division: Divisions such as state/province.
- City: the last level of region, some cities up to Country, some up to Division.
Attributes
Common attributes:
name: Common name of region.full_name: Full name or official namecode: ISO-3166-1-alpha2/ISO-3166-2 codelocal_name: translation of Common namelocal_full_name: translation of full namelocal_alias: alias in different languagelocal_abbr: Abbreviation
Country spec attributes:
emoji: Emoji flag of countrycapital: Captial of this countrycode_alpha3: Code of ISO-3166-1-alpha3currency_code: ISO-4177 Currency Code, e.g. USD, CNYcurrency_name: ISO-4177 Currency Name,local_currency_name: ISO-4177 Currency name in locale
Example:
Localization
Right now, only English(default and fallback) and Chinese-Simp zh-cn are supported. Locale settings is following Laravel project settings in config/app.php.
Dependencies
-
This package depends on jenssegers/laravel-mongodbhttps://github.com/jenssegers/laravel-mongodb. Ensure you finish all the setup steps and have your laravel app working with mongodb before you proceed to setup.
Setup
-
composer require -
Add Service Provider into
config/app.php - Publish and init
Usage
-
get all Continent
-
get all Countries
-
get country by code
-
get countries belong to a continent
-
get continent or parent
-
get division/state/province via Conutry
- get cities via Country or Division.
About
This package published under MIT license. If you have any question or suggestion, please feel free to submit a issue, or email me Sam Maosa<maosa.sam(AT)gmail.com>.
Good luck being a real Big-Data artisan.
All versions of laravel-mongodb-world with dependencies
laravel/framework Version >=5.3.0
jenssegers/mongodb Version ^3.4
jenssegers/mongodb-session Version ^1.2