PHPackages                             tz-laravel-admin-ext/china-distpicker - 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. tz-laravel-admin-ext/china-distpicker

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

tz-laravel-admin-ext/china-distpicker
=====================================

Distpicker extension for laravel-admin

v1.0(yesterday)01↑2900%MITPHPPHP &gt;=7.0.0

Since Mar 24Pushed yesterdayCompare

[ Source](https://github.com/tz-wesley/china-distpicker)[ Packagist](https://packagist.org/packages/tz-laravel-admin-ext/china-distpicker)[ Docs](https://github.com/laravel-admin-ext/china-distpicker)[ RSS](/packages/tz-laravel-admin-ext-china-distpicker/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

Distpicker extension for laravel-admin
======================================

[](#distpicker-extension-for-laravel-admin)

[Distpicker](https://github.com/fengyuanchen/distpicker)是一个中国省市区三级联动选择组件，这个包是基于`Distpicker`的`laravel-admin`扩展，用来将`Distpicker`集成进`laravel-admin`的表单中

截图
--

[](#截图)

[![wx20180905-212332](https://user-images.githubusercontent.com/1479100/45096011-186c8580-b152-11e8-8a38-dcd94cd46d4b.png)](https://user-images.githubusercontent.com/1479100/45096011-186c8580-b152-11e8-8a38-dcd94cd46d4b.png)

安装
--

[](#安装)

```
composer require laravel-admin-ext/china-distpicker
```

然后

```
php artisan vendor:publish --tag=laravel-admin-china-distpicker
```

配置
--

[](#配置)

在`config/admin.php`文件的`extensions`配置部分，加上属于这个扩展的配置

```
    'extensions' => [

        'china-distpicker' => [

            // 如果要关掉这个扩展，设置为false
            'enable' => true,
        ]
    ]
```

使用
--

[](#使用)

### 表单中使用

[](#表单中使用)

比如在表中有三个字段`province_id`, `city_id`, `district_id`, 在form表单中使用它：

```
$form->distpicker(['province_id', 'city_id', 'district_id']);
```

设置默认值

```
$form->distpicker([
    'province_id' => '省份',
    'city_id' => '市',
    'district_id' => '区'
], '地域选择')->default([
    'province' => 130000,
    'city'     => 130200,
    'district' => 130203,
]);
```

可以设置每个字段的placeholder

```
$form->distpicker([
    'province_id' => '省',
    'city_id'     => '市',
    'district_id' => '区'
]);
```

设置label

```
$form->distpicker(['province_id', 'city_id', 'district_id'], '请选择区域');
```

设置自动选择, 可以设置1,2,3 表示自动选择到第几级

```
$form->distpicker(['province_id', 'city_id', 'district_id'])->autoselect(1);
```

### 表格筛选中使用

[](#表格筛选中使用)

```
$filter->distpicker('province_id', 'city_id', 'district_id', '地域选择');
```

地区编码数据
------

[](#地区编码数据)

[Distpicker](https://github.com/fengyuanchen/distpicker)所使用的地域编码是基于国家统计局发布的数据, 数据字典为`china_area.sql`文件.

支持
--

[](#支持)

如果觉得这个项目帮你节约了时间，不妨支持一下;)

[![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)

License
-------

[](#license)

Licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 78.9% 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

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/117be66758e23b54394384783627b14cb8c0ca45f8e42efeb8f37efc5f87c54c?d=identicon)[whtony2003](/maintainers/whtony2003)

---

Top Contributors

[![z-song](https://avatars.githubusercontent.com/u/1479100?v=4)](https://github.com/z-song "z-song (15 commits)")[![a443939412](https://avatars.githubusercontent.com/u/13361366?v=4)](https://github.com/a443939412 "a443939412 (1 commits)")[![health901](https://avatars.githubusercontent.com/u/1503105?v=4)](https://github.com/health901 "health901 (1 commits)")[![ignoracenfly](https://avatars.githubusercontent.com/u/1384626?v=4)](https://github.com/ignoracenfly "ignoracenfly (1 commits)")[![jxlwqq](https://avatars.githubusercontent.com/u/2421068?v=4)](https://github.com/jxlwqq "jxlwqq (1 commits)")

---

Tags

extensionlaravel-admindistpicker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tz-laravel-admin-ext-china-distpicker/health.svg)

```
[![Health](https://phpackages.com/badges/tz-laravel-admin-ext-china-distpicker/health.svg)](https://phpackages.com/packages/tz-laravel-admin-ext-china-distpicker)
```

###  Alternatives

[laravel-admin-ext/china-distpicker

Distpicker extension for laravel-admin

13343.8k](/packages/laravel-admin-ext-china-distpicker)[laravel-admin-ext/chartjs

Use Chartjs in laravel-admin

102178.7k1](/packages/laravel-admin-ext-chartjs)[laravel-admin-ext/grid-sortable

Sort the grid data by drag and drop rows

43117.8k](/packages/laravel-admin-ext-grid-sortable)[jxlwqq/env-manager

Env Manager for Laravel-admin

3719.8k](/packages/jxlwqq-env-manager)[jxlwqq/quill

quill editor for laravel-admin

2426.8k](/packages/jxlwqq-quill)[cyd622/laravel-admin-ext-echarts

Use Echarts in laravel-admin

349.5k](/packages/cyd622-laravel-admin-ext-echarts)

PHPackages © 2026

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