PHPackages                             kaungmyat/myanmar-townships - 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. kaungmyat/myanmar-townships

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

kaungmyat/myanmar-townships
===========================

Laravel package for handling townships in myanmar

112PHP

Since Jan 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/KaungMyat-Min/myanmar-townships)[ Packagist](https://packagist.org/packages/kaungmyat/myanmar-townships)[ RSS](/packages/kaungmyat-myanmar-townships/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Myanmar-Townships
=================

[](#myanmar-townships)

A laravel package to handle backend for searching myanmar townships data. The package use [Myanmar-tools](https://github.com/google/myanmar-tools) and [Rabbit converter php version](https://github.com/Rabbit-Converter/Rabbit-PHP) to convert unicode to zawgyi.

#### Basic Uasage

[](#basic-uasage)

You can easily search township or district or state by unicode by using the MyanmarTownship Facade.

```
    MyanmarTownship::searchTownships('အင်းစိန်');
    MyanmarTownship::searchDistricts('မြောက်ပိုင်း');
    MyanmarTownship::searchStates('ရှမ်း');

```

#### Installation

[](#installation)

```
    composer require kaungmyat/myanmar-townships

```

If you want to support zawgyi search, you need to install [Myanmar-tools](https://github.com/google/myanmar-tools) and [Rabbit converter php version](https://github.com/Rabbit-Converter/Rabbit-PHP) as well.

After installation, prepare database.

```
    php artisan migrate
    php artisan db:seed --class='MyanmarTownships\Seeders\TownshipSeeder'
```

Usage
-----

[](#usage)

### Searching

[](#searching)

MyanmarTownship Facade is the entry point for searching and provides three methods:

- searchTownships
- searchDistricts
- searchStates

Parameter for these methods can be either a string or options array.

KeyoptionsDefault ValueqString to searchsortid, name\_mm, name\_enname\_mmorderasc, descasclimitinteger10resource\_resulttrue, falsefalse#### Customizing

[](#customizing)

By default, the library support only for unicode searching, if you want to customize this behaviour, publish the config file and change the value accordingly.

```
    php artisan vendor:publish --tag=myanmar-townships

```

KeyFeatureDefault Valuesearch\_by\_unicodeenable or disable searching by unicodetruesearch\_by\_zawgyienable or disable searching by zawgyifalsesearch\_by\_englishenable or disable searching by zawgyifalseresource\_resultreturn response should be model or jsonfalsefont\_converterFont converter pathMyanmarTownships\\App\\Helpers\\Contracts\\FontConverter#### Supporting Zawgyi font

[](#supporting-zawgyi-font)

This library use [Myanmar-tools](https://github.com/google/myanmar-tools) and [Rabbit converter php version](https://github.com/Rabbit-Converter/Rabbit-PHP) to convert unicode to zawgyi. If you want to support zawgyi font, you need to install those packages too. In case if you have already implemented font logic, you can skip that packages. Instead, you now need to implement FontHelper interface and provide full namespace in the config.

### Json response

[](#json-response)

If you want to obtain json obj instead of model, you can provide 'resource\_result' set to true either at run time or at the config file.

### Model relation

[](#model-relation)

For any model that needs to have a township, you can use HaveTownship Trait in the model.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/14840958f3e3e0e4a765843400ce753a60065f5b84084f6144de8d9c6e0163a4?d=identicon)[KaungMyat-Min](/maintainers/KaungMyat-Min)

---

Top Contributors

[![KaungMyat-Min](https://avatars.githubusercontent.com/u/46663626?v=4)](https://github.com/KaungMyat-Min "KaungMyat-Min (7 commits)")

### Embed Badge

![Health badge](/badges/kaungmyat-myanmar-townships/health.svg)

```
[![Health](https://phpackages.com/badges/kaungmyat-myanmar-townships/health.svg)](https://phpackages.com/packages/kaungmyat-myanmar-townships)
```

PHPackages © 2026

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