PHPackages                             hmilyfyj/area - 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. hmilyfyj/area

ActiveLibrary

hmilyfyj/area
=============

自用

v0.5.2(7y ago)0181MITPHPPHP &gt;=7.0.0

Since Sep 20Pushed 7y ago1 watchersCompare

[ Source](https://github.com/hmilyfyj/area)[ Packagist](https://packagist.org/packages/hmilyfyj/area)[ RSS](/packages/hmilyfyj-area/feed)WikiDiscussions master Synced 3d ago

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

About
-----

[](#about)

原作者的包没有支持 laravel 5.6，仅尝试做版本升级，无意冒犯。

Installing
----------

[](#installing)

`composer require temporaries/area`

Usage
-----

[](#usage)

### 生成数据

[](#生成数据)

请确认表名`areas`可被组件所使用 `php artisan area:generate`

### 方法使用

[](#方法使用)

```
Route::get('test', function (\Temporaries\Area\DatabaseRepository $area) {
    $area->isProvince(110000);         //判断省
    $area->isCity(110100);             //判断市
    $area->isDistrict(110101);         //判断区

    $area->getProvinceName(350203);    //根据省，市，区获取省名 如：福建省
    $area->getCityName(350203);        //根据市，区获取市名 如：厦门市
    $area->getDistrictName(350203);    //获取区获取区名 如：思明区

    $area->getProvinces();             //获取所有省份
    $area->getCities(350000);          //根据省份获取所有城市
    $area->getDistricts(350200);       //根据城市获取所有区县

    $area->getFormat(350203);          //生成格式化字符串 如:福建省厦门市思明区

    $area->getName(110000);            //获取名称 如:北京市

    $area->getParentPostcode(350203);  //获取父编号 如：350200
    $area->getParentName(350203);      //获取父名称 如：思明区

});
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

Total

5

Last Release

2912d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cc964228eff83f080f79507d6d51c2866d8ec33191b0e97f8f6c1dcd151b56a?d=identicon)[fengit](/maintainers/fengit)

---

Top Contributors

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

---

Tags

hmilyfyj

### Embed Badge

![Health badge](/badges/hmilyfyj-area/health.svg)

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

PHPackages © 2026

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