Package Data | |
---|---|
Maintainer Username: | vcarreira |
Maintainer Contact: | vitor.carreira@gmail.com (Vitor Carreira) |
Package Create Date: | 2016-11-06 |
Package Last Update: | 2019-09-08 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:08:28 |
Package Statistics | |
---|---|
Total Downloads: | 5,549 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 2 |
Total Open Issues: | 0 |
A simple Laravel 5 service provider for the umpirsky/country-list localized countries arrays.
Add the following line to the require
section of composer.json
:
{
"require": {
"vcarreira/country-list": "~1.0"
}
}
In /config/app.php
, add the following to providers
:
CountryList\CountryListServiceProvider::class,
and the following to aliases
:
'CountryList' => CountryList\Facades\CountryListFacade::class,
To use the service within your app, you need to retrieve it from the Laravel IoC
Container. The following example uses the app
helper to retrieve the list of countries in Portuguese.
$countries = app('countrylist')->all('pt_PT');
If the facade is registered within the aliases
section of the application configuration, you can also use the following code:
$countries = CountryList::all('pt_PT');