vcarreira/country-list

Ease access to localized countries provided by umpirsky package
5,678 1
Install
composer require vcarreira/country-list
Latest Version:1.0
PHP:>= 5.5.9
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

isbkch/laravel5-tail

A tail command for Laravel 5

1,266 1
sh0umik/laravel5-mailjet-5.3-fix

Mailjet driver for Laravel 5 with 5.3 Fix

781 0
webpatser/laravel-countries

Modern Laravel Countries package providing ISO 3166-2, ISO 3166-3, currency, cap...

3,019,907 851
mariuzzo/laravel-js-localization

Laravel Localization in JavaScript

4,235,954 606
davispeixoto/laravel5-salesforce

Laravel 5 Salesforce Force.com PHP Toolkit port

143,387 47