PHPackages                             sufyan/laravel-countries-states-cities - 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. sufyan/laravel-countries-states-cities

ActiveLibrary

sufyan/laravel-countries-states-cities
======================================

A simple laravel library using json files to populate the data for countries, states and cities.

1.0.3(2y ago)11.1k↓20.8%MITPHP

Since Feb 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sufyan-ashraf/laravel-countries-states-cities)[ Packagist](https://packagist.org/packages/sufyan/laravel-countries-states-cities)[ RSS](/packages/sufyan-laravel-countries-states-cities/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

laravel-countries-states-cities
===============================

[](#laravel-countries-states-cities)

A simple PHP/Laravel package using json files to populate the data for countries, states and cities.

Insights
--------

[](#insights)

Total Regions : 6 Total Sub Regions : 22 Total Countries : 250 Total States/Regions/Municipalities : 5,081 Total Cities/Towns/Districts : 150,540

How to install
--------------

[](#how-to-install)

```
    composer require sufyan/laravel-countries-states-cities
```

How to use
----------

[](#how-to-use)

```
    // Latest version - v1.0.0
    use sufyan\LaravelCountriesStatesCities\City;
    use sufyan\LaravelCountriesStatesCities\Country;
    use sufyan\LaravelCountriesStatesCities\State;

    // Available methods for Country
    $country = new Country();
    $country->getList();
    $country->search("167");
    $country->getById(167);
    $country->getByIdWithStates(167);
    $country->getByIdWithCities(167);

    // Available methods for State
    $state = new State();
    $state->getList();
    $state->getById($id);
    $state->search("punjab");
    $state->search(['country' => 167]);
    $state->search(['search' => "punjab"]);
    $state->search(['search' => "punjab", 'country' => 167]); //country is optional
    $state->getByIdWithCities($id);

    // Available methods for City
    $city = new City();
    $city->getList();
    $city->getById(85572);
    $city->search("lahore");
    $city->search(['country' => 167]);
    $city->search(['state' => 3176]);
    $city->search(['search' => "lahore", 'country' => 167, 'state' => 3176]); //country, state is ptional
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

2

Last Release

813d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/829161b925c90f2238b837a726e35ba463a31ff7be0fcf4d4cf1d7d7e5c371ec?d=identicon)[sufyan-ashraf](/maintainers/sufyan-ashraf)

---

Top Contributors

[![sufyan-ashraf](https://avatars.githubusercontent.com/u/30364936?v=4)](https://github.com/sufyan-ashraf "sufyan-ashraf (8 commits)")

### Embed Badge

![Health badge](/badges/sufyan-laravel-countries-states-cities/health.svg)

```
[![Health](https://phpackages.com/badges/sufyan-laravel-countries-states-cities/health.svg)](https://phpackages.com/packages/sufyan-laravel-countries-states-cities)
```

PHPackages © 2026

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