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

ActiveLibrary

xiaoyanou/laravel-express
=========================

xiaoyanou laravel express

v1.1(7y ago)04MITPHPPHP &gt;=7.0

Since Jan 15Pushed 6y agoCompare

[ Source](https://github.com/treasure-lau/laravel-express)[ Packagist](https://packagist.org/packages/xiaoyanou/laravel-express)[ RSS](/packages/xiaoyanou-laravel-express/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

ibrand/laravel-express:快递信息查询
-----------------------------

[](#ibrandlaravel-express快递信息查询)

特点

1. 一套写法兼容所有平台
2. 简单配置即可灵活增减服务商
3. 统一的返回值格式，便于日志与监控

TODO:
-----

[](#todo)

支持更多快递信息查询平台

目前平台支持
------

[](#目前平台支持)

- [快递100](http://www.kuaidi100.com/)

安装
--

[](#安装)

```
composer require "ibrand/laravel-express"
```

低于 Laravel5.5 版本:

`config/app.php`文件`providers`数组中添加：

```
iBrand\Express\ServiceProvider::class

```

`config/app.php` 文件`aliases`数组总 添加：

```
'Express'=> iBrand\Express\Facade::class

```

如需自定义配置请执行:

```
php artisan vendor:publish --provider="iBrand\Express\ServiceProvider"
```

使用
--

[](#使用)

实现了查询快递信息路由，支持`web`和`api`,可以自定义prefix：

```
'route' => [
	'prefix' => 'express',
	'middleware' => ['web'],
],
//or
'route' => [
	'prefix' => 'express',
	'middleware' => ['api'],
],
```

GET请求`http://your.domain/express/query`

参数：no 快递单号

返回结果：

```
{
    "kuaidi100": {
        "gateway": "kuaidi100",
        "status": "success",
        "result": [
            {
                "time": "2019-01-09 14:16:41",
                "ftime": "2019-01-09 14:16:41",
                "context": "[长沙市]已签收,感谢使用顺丰,期待再次为您服务"
            },
            {
                "time": "2019-01-09 09:03:41",
                "ftime": "2019-01-09 09:03:41",
                "context": "[长沙市]收方客户要求自取快件,待自取"
            },
            {
                "time": "2019-01-09 08:44:17",
                "ftime": "2019-01-09 08:44:17",
                "context": "[长沙市]快件交给周逢平，正在派送途中（联系电话：13017295338）"
            },
            {
                "time": "2019-01-08 16:00:50",
                "ftime": "2019-01-08 16:00:50",
                "context": "[长沙市]快件到达 【长沙浏阳东沙新村营业点】"
            },
            {
                "time": "2019-01-08 14:28:28",
                "ftime": "2019-01-08 14:28:28",
                "context": "[长沙市]快件已发车"
            },
            {
                "time": "2019-01-08 14:17:02",
                "ftime": "2019-01-08 14:17:02",
                "context": "[长沙市]快件在【长沙星沙集散中心】已装车,准备发往 【长沙浏阳东沙新村营业点】"
            },
            {
                "time": "2019-01-08 13:57:56",
                "ftime": "2019-01-08 13:57:56",
                "context": "[长沙市]快件到达 【长沙星沙集散中心】"
            },
            {
                "time": "2019-01-08 12:51:04",
                "ftime": "2019-01-08 12:51:04",
                "context": "[长沙市]快件已发车"
            },
            {
                "time": "2019-01-08 11:46:44",
                "ftime": "2019-01-08 11:46:44",
                "context": "[长沙市]快件在【长沙岳麓银盆岭营业点】已装车,准备发往下一站"
            },
            {
                "time": "2019-01-08 11:00:39",
                "ftime": "2019-01-08 11:00:39",
                "context": "[长沙市]顺丰速运 已收取快件"
            }
        ]
    }
}
```

你也可以通过使用`Facade`来查询快递信息

```
use Express;

Express::query(request('no'));
```

默认使用 `default` 中的设置来发送，如果你想要覆盖默认的设置。在 `query` 方法中使用第二个参数即可：

```
use Express;

Express::query((request('no'), ['aliyun']); // 这里的网关配置将会覆盖全局默认，需要在配置文件中配置好相关项
```

也可以这样：

```
use Express;

Express::query((request('no'), ['aliyun'=>[
    'app_key' => '',
    'app_secret' => '',
    'app_code' => '',
]]);
```

查询网关
----

[](#查询网关)

默认使用 `default` 中的设置来发送，如果你想要覆盖默认的设置。在 `query` 方法中使用第二个参数即可：

```
use Express;

$number = '810597623758';

Express::query($number, ['kuaidi100']); // 这里的网关配置将会覆盖全局默认值
```

返回值
---

[](#返回值)

由于使用多网关发送，所以返回值为一个数组，结构如下：

```
[
    'kuaidi100' => [
        'gateway' => 'kuaidi100',
        'status' => 'success',
        'result' => [...] // 平台返回值
    ],
    'aliyun' => [
        'gateway' => 'aliyun',
        'status' => 'failure',
        'exception' => \Exception 对象
    ],
    //...
]
```

如果所选网关列表均发送失败时，将会抛出 `\Exception` 异常，你可以使用 `$e->results` 获取发送结果。

各平台配置说明
-------

[](#各平台配置说明)

### [快递100](http://www.kuaidi100.com/)

[](#快递100)

```
    'kuaidi100' => [
        'key' => '',
        'customer' => '',
        'secret' => '',
        'sms_user_id' => ''
    ],
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.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

Every ~0 days

Total

2

Last Release

2674d ago

### Community

Maintainers

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

---

Top Contributors

[![tangqi1916](https://avatars.githubusercontent.com/u/193469035?v=4)](https://github.com/tangqi1916 "tangqi1916 (8 commits)")[![treasure-lau](https://avatars.githubusercontent.com/u/5563679?v=4)](https://github.com/treasure-lau "treasure-lau (1 commits)")

---

Tags

laravelexpressibrand

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[tpetry/laravel-mysql-explain

Get Visual MySQL EXPLAIN for Laravel.

264154.2k](/packages/tpetry-laravel-mysql-explain)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[ibrand/wechat-backend

wechat backend for Laravel Application.

133.7k](/packages/ibrand-wechat-backend)

PHPackages © 2026

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