New

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

menarasolutions/geographer-laravel

Geographer integration classes for Laravel and Lumen
121,898 19
Install
composer require menarasolutions/geographer-laravel
Latest Version:0.2.1
PHP:>=5.5.0
License:MIT
Last Updated:Oct 4, 2018
Links: GitHub  ·  Packagist
Maintainer: dusterio

geographer-laravel

Laravel (and Lumen) integration for Geographer

Getting started

Install Laravel integration package first:

$ composer require menarasolutions/geographer-laravel

Good news is that Laravel will take care of singleton instance for you, so no matter how many times you call it – it's the same object.

In Laravel 5.5, service providers and aliases are automatically registered. If you're using Laravel 5.5, skip ahead.

// Add in your config/app.php

'providers' => [
    '...',
    MenaraSolutions\Geographer\Integrations\LaravelServiceProvider::class,
];

'aliases' => [
    '...',
    'Geographer' => MenaraSolutions\Geographer\Integrations\LaravelFacade::class,
];

// Start playing with it, all the same calls
Geographer::getCountries()->useShortNames()->toArray();

Full list of methods is available in Geographer documentation

Related Packages

menarasolutions/geographer

A PHP library that knows how any country, state or city is called in any languag...

992,835 762
alamellama/geographer

A PHP library that knows how any country, state or city is called in any languag...

21,125 0
laravelista/loki

Laravel localization done right.

16,727 78
netstudio/loki

Laravel localization done right.

5,723 0
mcamara/laravel-localization

Easy localization for Laravel

10,576,794 3,556

Version History

Version Released PHP License
0.2.1 >=5.5.0 MIT
0.2.0 >=5.5.0 MIT
0.1.0 >=5.5.0 MIT