PHPackages                             w3-devmaster/laravel-geodata - 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. w3-devmaster/laravel-geodata

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

w3-devmaster/laravel-geodata
============================

Geo data package for laravel framework

1.0.0(2y ago)019MITPHPPHP &gt;=7.4

Since Nov 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/w3-devmaster/laravel-geodata)[ Packagist](https://packagist.org/packages/w3-devmaster/laravel-geodata)[ RSS](/packages/w3-devmaster-laravel-geodata/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

Geo Data Library for Laravel (Thailand)
=======================================

[](#geo-data-library-for-laravel-thailand)

[![Latest Version](https://camo.githubusercontent.com/5688bdcc6d0880d441d15d4b630dc374c721921bd1ff188e1c0872e7df082213/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f77332d6465766d61737465722f6c61726176656c2d67656f646174612e7376673f7374796c653d666c61742d737175617265)](https://github.com/w3-devmaster/laravel-geodata/releases)[![Total Downloads](https://camo.githubusercontent.com/b97fba291b58cf98fa0e7deaa5433602f4f32e0b7d9127675231286adaf50ef5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77332d6465766d61737465722f6c61726176656c2d67656f646174612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/w3-devmaster/laravel-geodata)

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

[](#installation)

Install with composer :

```
composer require w3-devmaster/laravel-geodata
```

Publish package files :

```
php artisan geodata:publish
```

Install package datas :

```
php artisan geodata:install
```

Basic Use
---------

[](#basic-use)

Get geography datas :

```
use W3Devmaster\GeoData\GeoData;

$geodata = new GeoData();
$geographies = $geodata->geographies();
$provinces = $geodata->provinces();
$districts = $geodata->districts();
$subDistricts = $geodata->subDistricts();

// Or use static method
$geographies = GeoData::geographies();
$provinces = GeoData::provinces();
$districts = GeoData::districts();
$subDistricts = GeoData::subDistricts();
```

Get relate data :

```
use W3Devmaster\GeoData\GeoData;

$province = GeoData::provinces()->first();

$districts = $province->districts;
```

Get parent data :

```
use W3Devmaster\GeoData\GeoData;

$province = GeoData::provinces()->first();

$geography = $province->geography;
```

Use query scope and|or eloqent :

```
use W3Devmaster\GeoData\GeoData;

$provinces = GeoData::provinces()->findName('นครร')->get(); // Like Condition
```

### Helpers

[](#helpers)

Get data for all sector :

```
$geographies = geographies();
$provinces = provinces();
$districts = districts();
$subDistricts = subDistricts();

$provinces = provinces()->findName('นครร')->get(); // Like Condition
```

Get single data for all sector :

```
$geo_name = geography($id)->name_th;
$province_name = province($id)->name_th;
$district_name = district($id)->name_th;
$sub_dis_name = subDistrict($id)->zip_code;
```

### Optional

[](#optional)

Add `Geo` facades to the `aliases` array in your `config/app.php` for use `Geo::class`:

```
'aliases' => Facade::defaultAliases()->merge([
        // 'Example' => App\Facades\Example::class,
        ...,
        'Geo' => W3Devmaster\GeoData\Facades\Geo::class,
])->toArray(),
```

For can use

```
use Geo;

$geodata = new Geo();
// Or
$geographies = Geo::geographies();
```

### Changelog

[](#changelog)

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

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

914d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ddaca3fd5e914c8f6595d35f110598b0e8c71b5e7b68e01ff46c65018fb9f2e?d=identicon)[w3-devmaster](/maintainers/w3-devmaster)

---

Top Contributors

[![w3-devmaster](https://avatars.githubusercontent.com/u/35686624?v=4)](https://github.com/w3-devmaster "w3-devmaster (11 commits)")

### Embed Badge

![Health badge](/badges/w3-devmaster-laravel-geodata/health.svg)

```
[![Health](https://phpackages.com/badges/w3-devmaster-laravel-geodata/health.svg)](https://phpackages.com/packages/w3-devmaster-laravel-geodata)
```

###  Alternatives

[js-phpize/js-phpize

Convert js-like syntax to standalone PHP code.

23402.4k3](/packages/js-phpize-js-phpize)

PHPackages © 2026

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