PHPackages                             liziyang/express - 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. liziyang/express

ActiveLibrary

liziyang/express
================

126PHP

Since Aug 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/litiziyang/express)[ Packagist](https://packagist.org/packages/liziyang/express)[ RSS](/packages/liziyang-express/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 Express
=========

[](#-express-)

简单便捷查询运单快递信息

### 支持快递鸟，快递100

[](#支持快递鸟快递100)

#### 此包是在别人开发基础上开发[原作者](https://github.com/inbjo/express/blob/master/README.md),由于和laravel9以上的guzzle版本冲突，所以做此修改

[](#此包是在别人开发基础上开发原作者由于和laravel9以上的guzzle版本冲突所以做此修改)

安装
--

[](#安装)

```
$composer require liziyang/express
```

配置
--

[](#配置)

在使用本扩展之前，你需要去 [快递100](https://www.kuaidi100.com/openapi/applyapi.shtml)或者 [快递鸟](http://www.kdniao.com/reg) 注册申请，获取到APP\_id和APP\_key。

快递100
-----

[](#快递100)

```
    use Lzy\Express\Kuaidi100Express;

    $express = new Kuaidi100Express('api_id','api_key')
    $express->query('$tracking_code', '$shipping_code','phone')//快递单号，快递公司编码，如果是顺丰快运，顺丰速运，丰网快运需要手机号
```

返回
--

[](#返回)

```
{
    "message": "ok",
    "nu": "888888888888",
    "ischeck": "1",
    "condition": "F00",
    "com": "shunfeng",
    "status": "200",
    "state": "3",
    "data": [
        {
            "time": "2019-03-08 19:11:51",
            "ftime": "2019-03-08 19:11:51",
            "context": "[安高广场速运营业点]快件已发车"
        },
        {
            "time": "2019-03-08 18:56:12",
            "ftime": "2019-03-08 18:56:12",
            "context": "[安高广场速运营业点]快件在【合肥蜀山区安高广场营业点】已装车,准备发往 【合肥经开集散中心】"
        },
        {
            "time": "2019-03-08 18:50:52",
            "ftime": "2019-03-08 18:50:52",
            "context": "[安高广场速运营业点]顺丰速运 已收取快件"
        }
    ]
}
```

### 快递鸟使用方法和快递100一样

[](#快递鸟使用方法和快递100一样)

```
    use Lzy\Express\KuaidiBirdExpress;

    $express = new KuaidiBirdExpress('api_id','api_key')
    $express->query('$tracking_code', '$shipping_code')//快递单号，快递公司编码，如果是顺丰快运，顺丰速运，丰网快运需要手机号
```

快递鸟返回
-----

[](#快递鸟返回)

```
{
    "LogisticCode": "8888888888888888",
    "ShipperCode": "YTO",
    "Traces": [
        {
            "AcceptStation": "【四川省直营市场部公司】 取件人: 四川省直营市场部41 已收件",
            "AcceptTime": "2019-03-21 11:03:40"
        },
        {
            "AcceptStation": "【四川省直营市场部公司】 已收件",
            "AcceptTime": "2019-03-21 13:45:01"
        },
        {
            "AcceptStation": "【成都转运中心】 已收入",
            "AcceptTime": "2019-03-21 22:40:01"
        }
    ],
    "State": "3",
    "OrderCode": "",
    "EBusinessID": "100000",
    "Success": true
}
```

### 通用方法

[](#通用方法)

```
    use Lzy\Express\Express;

    $express = new Express($app_id,$app_key,$type); //$type支持类型'Kuaidi100Express'、'KuaidiBirdExpress'
    &&
    $express = app('express');

    $express->track($tracking_code, $shipping_code，$additional)////快递单号，快递公司编码,额外参数
```

### 在 Laravel 中使用

[](#在-laravel-中使用)

需要在`config/services.php`配置

```
.
.
.
'express' => [
'id' => env('EXPRESS_ID'),
'key' => env('EXPRESS_KEY'),
'type' => env('EXPRESS_TYPE'),
],
```

然后在 `.env` 中配置 `EXPRESS_ID`、`EXPRESS_KEY`、`EXPRESS_TYPE`；

```
EXPRESS_ID=xxxxxxxxxxxxxxxxxxxxx
EXPRESS_KEY=xxxxxxxxxxxxxxxxxxxxx
EXPRESS_TYPE=Kuaidi100Express
```

### 注意

[](#注意)

```
文档中 $shipping_code 为快递编码，

    示例
        '顺丰'        => 'shunfeng',
        '顺丰速运'     => 'shunfeng',
        '顺丰快运'     => 'shunfengkuaiyun',
        '韵达快递'     => 'yunda',
        '韵达'         => 'yunda',

```

参考
--

[](#参考)

- [快递100接口文档](https://www.kuaidi100.com/openapi/api_post.shtml)
- [快递100快递公司编码](https://blog.csdn.net/u011816231/article/details/53063611)
- [快递鸟接口文档](http://www.kdniao.com/documents)
- [快递鸟快递公司编码](http://www.kdniao.com/documents)

License
-------

[](#license)

MIT

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![litiziyang](https://avatars.githubusercontent.com/u/51893504?v=4)](https://github.com/litiziyang "litiziyang (19 commits)")

### Embed Badge

![Health badge](/badges/liziyang-express/health.svg)

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

PHPackages © 2026

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