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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hmilyfyj/area

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

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

自用

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

Since Sep 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hmilyfyj/area)[ Packagist](https://packagist.org/packages/hmilyfyj/area)[ RSS](/packages/hmilyfyj-area/feed)WikiDiscussions master Synced 2w 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 31% 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

2958d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6600252?v=4)[fengit](/maintainers/fengit)[@fengit](https://github.com/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)
```

###  Alternatives

[solarissmoke/disable-comments-mu

This is the must-use version of the Disable Comments WordPress plugin. Copy the contents of this directory into your mu-plugins directory in order to disable comments on the entire site/network, without any configuration. You should delete all existing comments from the WordPress database before activating this plugin. If you want to be able to configure the plugin's behaviour, then use the normal version.

6569.4k](/packages/solarissmoke-disable-comments-mu)[dstuecken/php7ify

php7ify is a project that brings new php7 classes and exceptions to php 5.x.

11158.4k1](/packages/dstuecken-php7ify)[thiktak/filament-nested-builder-form

Plugin for FilamentPHP - Nested Builder Form Component

208.9k1](/packages/thiktak-filament-nested-builder-form)

PHPackages © 2026

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