New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

vcarreira/country-list

Ease access to localized countries provided by umpirsky package
5,683 1
Install
composer require vcarreira/country-list
Latest Version:1.0
PHP:>= 5.5.9
Laravel:5
License:MIT
Last Updated:Sep 8, 2019
Links: GitHub  ·  Packagist
Maintainer: vcarreira

CountryList

A simple Laravel 5 service provider for the umpirsky/country-list localized countries arrays.

Installation

Add the following line to the require section of composer.json:

{
    "require": {
        "vcarreira/country-list": "~1.0"
    }
}

Setup

In /config/app.php, add the following to providers:

CountryList\CountryListServiceProvider::class,

and the following to aliases:

'CountryList' => CountryList\Facades\CountryListFacade::class,

Usage

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');

Related Packages

monarobase/country-list

List of all countries with names and ISO 3166-1 codes in all languages and data...

3,186,391 275
lykegenes/laravel-countries

Get informations about countries.

27,368 7
woodsandwalker/laravel-countries

Laravel Countries is a bundle for Laravel providing ISO 3166_2 codes for all cou...

13,828 10
opheus2/laravel-countries

Get informations about countries and their currency.

10,452 0
fivesqrd/fluent-laravel

A Laravel 5 service provider for including the Fluent PHP library.

3,201 0

Version History

Version Released PHP Laravel License
1.0 >= 5.5.9 ~5.1 MIT