PHPackages                             milenmk/laravel-locations - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. milenmk/laravel-locations

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

milenmk/laravel-locations
=========================

Add Countries, Cities, Areas, Languages and Currencies models to your Laravel application

1.4.0(6mo ago)461.2k↓71.4%6MITPHPPHP ^8.2

Since Mar 3Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/milenmk/laravel-locations)[ Packagist](https://packagist.org/packages/milenmk/laravel-locations)[ RSS](/packages/milenmk-laravel-locations/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (8)Dependencies (3)Versions (10)Used By (0)

Laravel Locations
=================

[](#laravel-locations)

[![Latest Version on Packagist](https://camo.githubusercontent.com/94515cf0e5ce8aa024f1892da6dc80121f7b303f4b82476aa484f22f16101425/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696c656e6d6b2f6c61726176656c2d6c6f636174696f6e732e7376673f7374796c653d666c6174)](https://packagist.org/packages/milenmk/laravel-locations)[![Total Downloads](https://camo.githubusercontent.com/b16cc371f26fe35269ce102a56890e074fea9231740d5229e6fd6bb5e12cc6bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696c656e6d6b2f6c61726176656c2d6c6f636174696f6e732e7376673f7374796c653d666c6174)](https://packagist.org/packages/milenmk/laravel-locations)[![GitHub User's stars](https://camo.githubusercontent.com/8fdd3a0fb5ee64e0b11464be1413282457f80c5c8b28ffd2bdf23c9d577c5170/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d696c656e6d6b2f6c61726176656c2d6c6f636174696f6e73)](https://github.com/milenmk/laravel-locations)[![Laravel 10 Support](https://camo.githubusercontent.com/0b7f902482de7d3663b7aa6b87b7caca6e7b3fed489112e6f65f79f4514e60de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e7825374331312e7825374331322e782d6f72616e67653f7374796c653d666c6174266c6f676f3d6c61726176656c)](https://laravel.com/docs)[![PHP Version Support](https://camo.githubusercontent.com/43b05f79a370e440436ceeb6f2f3ca1bb576d36f06beb46d1023216f85aebfcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d696c656e6d6b2f6c61726176656c2d6c6f636174696f6e733f7374796c653d666c6174)](https://www.php.net)[![License](https://camo.githubusercontent.com/114bd291d66f64ec0d217e0f3c9c14640f11928cd0fd4cf44cdc76c9759ac358/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d696c656e6d6b2f6c61726176656c2d6c6f636174696f6e732e7376673f7374796c653d666c6174)](https://github.com/milenmk/laravel-locations/blob/develop/LICENSE.md)[![Contributions Welcome](https://camo.githubusercontent.com/9e93e892d0685e1bf7a1d0bd7c8410d6ecf2086a0a7b48dd58a6b96fa556ea2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/milenmk/laravel-locations/issues)[![Sponsor me](https://camo.githubusercontent.com/2aff1b5ae52a46452f3284b52645e299f456561d4dfd9b4d20d0a00a8351a123/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d2545322539442541342d6666363962343f7374796c653d666c6174)](https://www.patreon.com/c/LaravelAddonsbyMilen)

Laravel Locations provides a large database with Countries, Cities, Areas, Languages and Currencies models to your Laravel application

The package is ideal for applications that need:

- Country/region selection dropdowns
- Address validation and normalization
- Multi-language support for location names
- Currency conversion functionality
- Location-based features and filtering

### Database Contents

[](#database-contents)

- 250 Countries
- 5038 Cities (States/Regions)
- 149,350 Areas (subdivisions of Cities/States)

You can access this data either via the **Eloquent models** or directly through the **JSON files** included in the package.

By default, all records are active (`is_activated = 1`). You can filter active records using the **`activated()` scope**.

> **Deprecated:** `getActive()` method is deprecated since v1.4.0. Use `activated()` scope instead.

---

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 9.x or higher

Install
-------

[](#install)

Run the following commands:

- to install the package

```
composer require milenmk/laravel-locations

```

- to publish the migrations

```
php artisan milenmk-locations:install

```

- to seed the database tables with the data included in the JSON files

```
php artisan milenmk-locations:seed

```

When the commands are run, the database tables for the models will be created, and then they will be seeded with the data included in the JSON files.

### For version 1.3+

[](#for-version-13)

If you have a previous version installed, run this command to update the country table and add the translations:

```
php artisan milenmk-locations:update-countries-translations

```

[USAGE](documentation/usage.md)

[EXAMPLES](documentation/examples.md)

[PERFORMANCE](documentation/performance.md)

[MODELS](documentation/models.md)

DISCLAIMER
----------

[](#disclaimer)

This package is provided "as is" without warranty of any kind, either express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, or noninfringement.

The author(s) makes no representations or warranties regarding the accuracy, reliability or completeness of the code or its suitability for any specific use case. It is recommended that you thoroughly test this package in your environment before deploying it to production.

By using this package, you acknowledge and agree that the author(s) shall not be held liable for any damages, losses or other issues arising from the use of this software.

Contributing
------------

[](#contributing)

You can review the source code, report bugs, or contribute to the project by visiting the GitHub repository:

[GitHub Repository](https://github.com/milenmk/laravel-livewire-crud)

Feel free to open issues or submit pull requests. Contributions are welcome!

Changelog
---------

[](#changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for more information on what has changed recently.

Support My Work
---------------

[](#support-my-work)

If this package saves you time, you can support ongoing development:
👉 [Become a Patron](https://www.patreon.com/c/LaravelAddonsbyMilen)

Other Packages
--------------

[](#other-packages)

Check out my other Laravel packages:

- **[Laravel GDPR Cookie Manager](https://packagist.org/packages/milenmk/laravel-gdpr-cookie-manager)** - GDPR-compliant cookie consent management with user preference tracking
- **[Laravel Blacklist](https://packagist.org/packages/milenmk/laravel-blacklist)** - A Laravel package for blacklist validation of user input
- **[Laravel Email Change Confirmation](https://packagist.org/packages/milenmk/laravel-email-change-confirmation)** - Secure email change confirmation system
- **[Laravel GDPR Exporter](https://packagist.org/packages/milenmk/laravel-gdpr-exporter)** - GDPR-compliant data export functionality
- **[Laravel Rate Limiting](https://packagist.org/packages/milenmk/laravel-rate-limiting)** - Advanced rate limiting capabilities with exponential backoff
- **[Laravel Datatables and Forms](https://packagist.org/packages/milenmk/laravel-simple-datatables-and-forms)** - Easy to use package to create datatables and forms for Livewire components

License
-------

[](#license)

This package is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

Disclaimer
----------

[](#disclaimer-1)

This package is provided "as is", without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or noninfringement.

The author(s) make no guarantees regarding the accuracy, reliability, or completeness of the code, and shall not be held liable for any damages or losses arising from its use.

Please ensure you thoroughly test this package in your environment before deploying it to production.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance67

Regular maintenance activity

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

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 ~37 days

Recently: every ~74 days

Total

9

Last Release

193d ago

PHP version history (2 changes)1.0.0PHP ^8.1

1.3.0PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4587305?v=4)[Milen Karaganski](/maintainers/milenmk)[@milenmk](https://github.com/milenmk)

---

Top Contributors

[![milenmk](https://avatars.githubusercontent.com/u/4587305?v=4)](https://github.com/milenmk "milenmk (19 commits)")

---

Tags

citycountrylaravellocation

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/milenmk-laravel-locations/health.svg)

```
[![Health](https://phpackages.com/badges/milenmk-laravel-locations/health.svg)](https://phpackages.com/packages/milenmk-laravel-locations)
```

###  Alternatives

[unisolutions/silverstripe-copybutton

Adds copy button to the GridField.

1736.5k](/packages/unisolutions-silverstripe-copybutton)[fluidtypo3/builder

The builder package from FluidTYPO3

259.6k1](/packages/fluidtypo3-builder)[trafiklab/gtfs-php-sdk

Use GTFS and GTFS-realtime data in your PHP projects

175.6k](/packages/trafiklab-gtfs-php-sdk)

PHPackages © 2026

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