PHPackages                             tarikmanoar/bdlocation - 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. tarikmanoar/bdlocation

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

tarikmanoar/bdlocation
======================

Locations of Bangladesh

10PHP

Since Aug 7Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tarikmanoar/bdlocation)[ Packagist](https://packagist.org/packages/tarikmanoar/bdlocation)[ RSS](/packages/tarikmanoar-bdlocation/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/f80f59c2f9cb9345427c13f8e9bc32505e707ec47709a27c2a7a02e0d8147645/68747470733a2f2f7472617669732d63692e6f72672f616c696d72616e61686d65642f42444c6f636174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alimranahmed/BDLocation)[![License](https://camo.githubusercontent.com/250ec5c5b91bc5278245fc983f0334cae12bb0294fa57d7993a20d6787625f06/68747470733a2f2f706f7365722e707567782e6f72672f616c696d72616e61686d65642f62646c6f636174696f6e2f6c6963656e7365)](https://packagist.org/packages/alimranahmed/bdlocation)[![Latest Stable Version](https://camo.githubusercontent.com/871e3025ca2d1a5e14b346abd8eff9745bbcb75e93bc92f6a9a2d2e58b4963e6/68747470733a2f2f706f7365722e707567782e6f72672f616c696d72616e61686d65642f62646c6f636174696f6e2f762f737461626c65)](https://packagist.org/packages/alimranahmed/bdlocation)

BDLocation
==========

[](#bdlocation)

A PHP interface to access Locations of Bangladesh. The data in this project used and slightly modified from [Bangladesh-geolocation](https://github.com/nuhil/bangladesh-geocode)

Features
--------

[](#features)

1. Can access name, bengali\_name etc of divisions, districts, sub districts and unions of Bangladesh
2. Zero configurations

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

[](#requirements)

PHP &gt;= 7

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

[](#installation)

Execute the following command in the terminal while you are in the root directory of your PHP project:

`composer require alimranahmed/bdlocation`

That's it! you are ready to go!

Usages
------

[](#usages)

Don't forget to use the BD class:

```
use BDLocation\BD;

```

To get all **divisions** of Bangladesh as an array of Location object:

```
BD::division()->all();

```

To get all **districts** of Bangladesh as an array of Location object:

```
BD::district()->all();

```

To get all **sub-districts/upazilas** of Bangladesh as an array of Location object:

```
BD::subDistrict()->all();

```

To get all **unions** of Bangladesh of Bangladesh as an array of Location object:

```
BD::union()->all();

```

To get all the districts of division that start with 5 character `chatt`(Chattogram), we can use the following code. Same thing will work for sub-disctrict and union. But in case of sub-district and union we need to pass `district` and `sub_district` respectively.

```
BD::district()->getWhere('division', 'chatt');
BD::subDistrict()->getWhere('district', 'brahm');
BD::union()->getWhere('sub_district', 'sarai');

```

To get the district that has name `Brahmanbaria` we can use the following code. Same thing will work for division, sub-district and union also. Insead of `name` we can pass `short_name`(first 3 letter of the location), `bengali_name` also.

```
BD::district()->getWhere('name', 'brahmanbaria');
or
BD::district()->getWhere('name', '=', 'brahmanbaria');

```

To get all the districts that contains the letter `rahman` in it's name we can use the following code. Same thing will work for division, sub-district and union also. Insead of `name` we can pass `short_name`(first 3 letter of the location), `bengali_name` also.

```
BD::district()->getWhere('name', 'like', 'rahman');

```

**Note:** We have only `=` and `like` as operator here. No other operator will work here.

Wishlist
--------

[](#wishlist)

- Supporting more operators like `like%` `%like` etc.

### Contribution

[](#contribution)

**Anyone is always welcome to contribute on the project. If you want to work with:**

1. Just create and issue(even if you want to fix the issue).
2. After fixing any issue or adding any new feature just send a pull request
3. I will be happy to add your code for the betterment of this project. Thanks.

Licence
-------

[](#licence)

[MIT](https://opensource.org/licenses/MIT)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 87% 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/c6f1e05b86fdecee295e9d7bdc602ee2cb54c59691f1551353853696cc70f3a6?d=identicon)[tarikmanoar](/maintainers/tarikmanoar)

---

Top Contributors

[![alimranahmed](https://avatars.githubusercontent.com/u/7629427?v=4)](https://github.com/alimranahmed "alimranahmed (47 commits)")[![baharam000](https://avatars.githubusercontent.com/u/638977?v=4)](https://github.com/baharam000 "baharam000 (4 commits)")[![tarikmanoar](https://avatars.githubusercontent.com/u/17971022?v=4)](https://github.com/tarikmanoar "tarikmanoar (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

### Embed Badge

![Health badge](/badges/tarikmanoar-bdlocation/health.svg)

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)

PHPackages © 2026

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