PHPackages                             claz/wishi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. claz/wishi

ArchivedProject[Framework](/categories/framework)

claz/wishi
==========

An agnostic package to get different countries, states and counties.

v1.0.2.1(9y ago)19279[2 issues](https://github.com/andela-tolotin/locator/issues)[1 PRs](https://github.com/andela-tolotin/locator/pulls)MITPHPPHP &gt;=5.5.9

Since Jun 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/andela-tolotin/locator)[ Packagist](https://packagist.org/packages/claz/wishi)[ RSS](/packages/claz-wishi/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (6)Versions (30)Used By (0)

Locator
=======

[](#locator)

---

[![Coverage Status](https://camo.githubusercontent.com/041969dc2c5fb73ff2a162536351e57e6eab4ec13f4f885ae7d69f23abb9c95e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616e64656c612d746f6c6f74696e2f6765742d636f756e7472792d696e666f2f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/andela-tolotin/get-country-info?branch=develop)[![Build Status](https://camo.githubusercontent.com/6b00773bbf9521f3b7e83085b67f4703bf39ad48d1c2f5a924b85153915f4b0b/68747470733a2f2f7472617669732d63692e6f72672f616e64656c612d746f6c6f74696e2f6c6f6361746f722e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/andela-tolotin/locator)[![StyleCI](https://camo.githubusercontent.com/3bf9047e3cb5dd9bfb8ae811ced320b125f8849b027d6f46216616044efe2bf4/68747470733a2f2f7374796c6563692e696f2f7265706f732f36303632343130392f736869656c64)](https://styleci.io/repos/60624109)
If you have ever needed basic information about countries, and their states, then Locator is for you. Locator is a PHP package that works with the Yahoo API. It returns data that you need just by calling one method. There is a Service Provider and a Facade to make it easy to integrate with your Laravel project. It can also be used with other PHP frameworks like Lumen, CakePHP, Zend, etc. Version 1.0.0 only provides information about the following:

- Countries
- States in the country
- Counties in the state

Dependencies
------------

[](#dependencies)

---

- PHP 5.5+
- Composer 1.4+
- Apache

Getting Started
---------------

[](#getting-started)

---

To use this package with a PHP project, first require the package using composer.

```
composer require claz/wishi
```

- Note that you must be registered in Yahoo as a developer. Add your Yahoo details to your environment variables.

```
YAHOO_CLIENT_ID=*********************************
```

### Using plain PHP

[](#using-plain-php)

If you are using this project with a plain PHP project, follow the following steps:

- Run `composer dumpautoload` if required.
- Require autoload.php and load the package with its dependencies.

```
require_once ('vendor/autoload.php')

use Wishi\Controllers\Locator;
```

- Instantiate the Locator class and you are good to go.

```
$locator = new Locator();
```

### Using with Laravel

[](#using-with-laravel)

If you are using this project with Laravel, follow the following steps:

- Open app.config in config folder and,
- Register the ServiceProvider inside `config.php`

```
Wishi\Providers\LocatorServiceProvider::class,
```

- To use the Facade, simple add it to the same file.

```
Locator => Wishi\Facades\Locator::class,
```

- Import the Facade into your project.

```
use Locator;
```

### Example

[](#example)

---

- To get all the countries.

```
// With normal PHP applications
$countries = $locator->getCountries();

// With the Facade in Laravel applications
$countries = Locator::getCountries();

var_dump($countries); // Collection of countries
```

- To get all the states in a country.

```
// With normal PHP applications
$states = $locator->getStates('Nigeria');

// With the Facade in Laravel applications
$states = Locator::getStates('Nigeria');

var_dump($states); // Collection of states
```

- To get all the counties in a state.

```
// With normal PHP applications
$counties = $locator->getCounties('Lagos');

// With the Facade in Laravel applications
$counties = Locator::getCounties('Lagos');

var_dump($counties); // Collection of counties
```

One very common use is illustrated below in a Laravel project that lists all the state in the Nigeria.

```

@foreach(Locator::getStates('Nigeria') as $state)
     {{ $state->name }}
@endforeach

```

License
-------

[](#license)

---

This project uses the MIT License feel free to contribute.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 50.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

3627d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9338a1c768c2e964e80b8d14adcdd91bcc0fd74f487661c348f5483c5acc3f23?d=identicon)[andela-tolotin](/maintainers/andela-tolotin)

---

Top Contributors

[![olotintemitope](https://avatars.githubusercontent.com/u/14159435?v=4)](https://github.com/olotintemitope "olotintemitope (56 commits)")[![elchroy](https://avatars.githubusercontent.com/u/17028608?v=4)](https://github.com/elchroy "elchroy (54 commits)")[![olakehinde](https://avatars.githubusercontent.com/u/25386385?v=4)](https://github.com/olakehinde "olakehinde (1 commits)")

---

Tags

phpframeworklaravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/claz-wishi/health.svg)

```
[![Health](https://phpackages.com/badges/claz-wishi/health.svg)](https://phpackages.com/packages/claz-wishi)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.5k](/packages/laravel-framework)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[laravel-zero/framework

The Laravel Zero Framework.

3491.5M421](/packages/laravel-zero-framework)[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
