PHPackages                             thedevsbuddy/laraworld - 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. thedevsbuddy/laraworld

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

thedevsbuddy/laraworld
======================

A simple package for the world data (Country, State and City)

0.1.5(4y ago)07MITPHPPHP ^7.4|^8.0

Since Dec 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/thedevsbuddy/laraworld)[ Packagist](https://packagist.org/packages/thedevsbuddy/laraworld)[ Docs](https://github.com/thedevsbuddy/laraworld)[ RSS](/packages/thedevsbuddy-laraworld/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

LaraWorld
=========

[](#laraworld)

A simple package for the world data (Country, State and City)

[![Build Status](https://camo.githubusercontent.com/c7157a76da393619cecd925e1b9245d095eb2d0f8c0343bc92899c7ce3e2929c/68747470733a2f2f7472617669732d63692e6f72672f7468656465767362756464792f6c617261776f726c642e737667)](https://travis-ci.org/thedevsbuddy/laraworld)[![Total Downloads](https://camo.githubusercontent.com/581b1f57e0229328ee75d3677a0184f78f0b1b189488d5c8f945078c94b2f001/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468656465767362756464792f6c617261776f726c64)](https://packagist.org/packages/thedevsbuddy/laraworld)[![Latest Stable Version](https://camo.githubusercontent.com/ef9fafc833a192e33bdd24949aa8cc5e310c2ae6e7a214d07d14ecd1a2996cda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7468656465767362756464792f6c617261776f726c64)](https://packagist.org/packages/thedevsbuddy/laraworld)[![License](https://camo.githubusercontent.com/4dae09f6be5d18fe5c3851e8504f9d067cb0d94e27db50e09df221ca688033f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7468656465767362756464792f6c617261776f726c64)](https://packagist.org/packages/thedevsbuddy/laraworld)

Get the country state and city related data for your laravel projects.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require thedevsbuddy/laraworld
```

Publish the assets

```
php artisan vendor:publish --provider="Devsbuddy\Laraworld\LaraworldServiceProvider"
```

Create Country, State and City tables and Import data.

```
php artisan laraworld:import
```

Usage
-----

[](#usage)

#### jQuery

[](#jquery)

LaraWorld uses ajax to fetch the country state and city data which requires `jQuery` as a dependency. So you will have to use `jQuery` in the page before adding `laraworldScripte` in the page.

Load `jQuery` and `laraworldScripts` In your `app.blade.php` or wherever needed.

```

    @laraworldScripts

```

To show dropdown in any page for the country, state and city you can use.

```

```

That's it, You don't have to do anything else. Now it will automatically populate the countries and when you select a country it will show state list and so on.

### Additional options

[](#additional-options)

#### Set default value

[](#set-default-value)

If you want to set the default selected option / value you can do that as well. To set default value you can pass `data-value` property in the `select` element.

**Example**

```

```

#### Select2

[](#select2)

If you want to use `select2` on your app we have also covered it.

To initialized `select2` just add `select2` class in the select element.

#### Example

[](#example)

```

```

**Note:- You will have to import `select2` CDN in the page.**

### Changelog

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Shoaib Khan](https://github.com/devsbuddy)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

3

Last Release

1605d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eac0b29b7d51497054d075ebc08322e2cf182ca34e69079160f7d5ea8558ba2d?d=identicon)[devsbuddy](/maintainers/devsbuddy)

---

Top Contributors

[![thedevsbuddy](https://avatars.githubusercontent.com/u/72697792?v=4)](https://github.com/thedevsbuddy "thedevsbuddy (12 commits)")

---

Tags

devsbuddylaraworld

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thedevsbuddy-laraworld/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M686](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M861](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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