PHPackages                             jiangyong/address-fence - 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. [API Development](/categories/api)
4. /
5. jiangyong/address-fence

ActiveLibrary[API Development](/categories/api)

jiangyong/address-fence
=======================

a address-fence APi

1.0.4(7y ago)014.0k1MITPHP

Since Sep 26Pushed 7y agoCompare

[ Source](https://github.com/jiangyong19910326/addressFence)[ Packagist](https://packagist.org/packages/jiangyong/address-fence)[ RSS](/packages/jiangyong-address-fence/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (6)Used By (1)

 address-fence
===============

[](#-address-fence-)

 a address-fence APi.

### 安装

[](#安装)

```
$ composer require jiangyong/address-fence
```

### 配置

[](#配置)

```
在使用本扩展之前，请先熟悉配置相关
1.配置默认的模型字段'lngMin','lngMax','latMin','latMax'
2.当然你也可以自己配置字段
  首先在config/services.php中
  添加以下
  'addressFence' => [
          'lngMin' => env('ADDRESS_LNGMIN'),
          'lngMax' => env('ADDRESS_LNGMAX'),
          'latMin' => env('ADDRESS_LATMIN'),
          'latMax' => env('ADDRESS_LATMAX'),
          ]
  然后在.env文件中配置你自己的数据表字段名
  ADDRESS_LNGMIN=
  ADDRESS_LNGMAX=
  ADDRESS_LATMIN=
  ADDRESS_LATMAX=

```

使用
--

[](#使用)

```
在需要的控制器中添加
use Jiangyong\AddressFence\addressFence;
然后调用
在方法中注入实力类，写法如下:
public function Demo(addressFence $addressFence)
{
    /*
    *参数 $areaFence就是你输入的围栏地址
    *方法返回一个长方形的两个最大最小的xy点
    */
    $addressFence->returnPointOfAddressFence($areaFence)

}

在模型中通过调用获取数据库中可行的围栏区域
在你需要的模型中
use Jiangyong\AddressFence\Traits;
在模型类中调用即可
class model_name extends model
{
    use Traits\AddressScope;
}
然后在你的控制器中直接返回长方形区域
public functiong demoText(Model $model)
{
    /**
    *   $polygon就是你地址围栏获得的长方形区域最大最小的xy点
    */
    Model::returnFeasibleFenceArea($polygon)->get()
}
最后通过调用返回最后可行的地址围栏数据
public funtion demoTest(addressFence $addressFence)
{
    /**
    * $area 为返回的长方形区域
    * $point 输入的一个具体的点
    /
    $addressFence->returnFinalArea($area,$point);
}

```

TODO

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/jiangyong/address-fence/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/jiangyong/address-fence/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Total

6

Last Release

2800d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca84779609892ea9c2ba9e85cd0c500499294af9e2e34190c99ccb00e32ed0ae?d=identicon)[jiangyong19910326](/maintainers/jiangyong19910326)

---

Top Contributors

[![jiangyong19910326](https://avatars.githubusercontent.com/u/32673729?v=4)](https://github.com/jiangyong19910326 "jiangyong19910326 (2 commits)")

### Embed Badge

![Health badge](/badges/jiangyong-address-fence/health.svg)

```
[![Health](https://phpackages.com/badges/jiangyong-address-fence/health.svg)](https://phpackages.com/packages/jiangyong-address-fence)
```

###  Alternatives

[ronasit/laravel-swagger

Provided middleware for generating of swagger-documentation file by run testing of restful API.

179129.9k2](/packages/ronasit-laravel-swagger)[cloudcreativity/json-api-testing

PHPUnit test helpers to check JSON API documents.

141.7M4](/packages/cloudcreativity-json-api-testing)

PHPackages © 2026

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