PHPackages                             libaocai/laravel-getui - 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. libaocai/laravel-getui

ActiveLibrary

libaocai/laravel-getui
======================

A getui package for laravel or lumen.

v1.4.0(4y ago)1471MITPHP

Since Jun 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/libaocai90/laravel-getui)[ Packagist](https://packagist.org/packages/libaocai/laravel-getui)[ RSS](/packages/libaocai-laravel-getui/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

欢迎使用 Laravel扩展包 laravel-getui
=============================

[](#欢迎使用-laravel扩展包-laravel-getui)

主要功能
====

[](#主要功能)

单人推送/多人推送/全量推送/推送任务撤回(待开发)
--------------------------

[](#单人推送多人推送全量推送推送任务撤回待开发)

### 支持模板

[](#支持模板)

#### 透传模板（自定义消息）

[](#透传模板自定义消息)

#### 通知模板（打开应用首页）

[](#通知模板打开应用首页)

#### 通知模板 （打开浏览器网页）

[](#通知模板-打开浏览器网页)

#### 通知模板 （打开应用内页面）

[](#通知模板-打开应用内页面)

### 安装

[](#安装)

```
composer require libaocai/laravel-getui

```

### 发布配置

[](#发布配置)

```
php artisan vendor:publish --provider="Laravel/Getui/GetuiServiceProvider"

```

### 给 `config/app.php` 添加服务提供者

[](#给-configappphp-添加服务提供者)

providers 数组中添加:

```
Laravel\Getui\GetuiServiceProvider::class

```

### 使用

[](#使用)

#### 1.单推

[](#1单推)

##### 1-1单推-通知打开应用首页

[](#1-1单推-通知打开应用首页)

```
private function notificationSingle()
    {
        $data = [
            'network_type' => 0,
            'client_id' => 'c3024643a24c11bd3762d437c9103a42',
            'content' => '单人推送内容',
            'title' => '单人推送标题',
            'text' => '单人推送文本',
            'is_ring' => true,
            'is_vibrate' => true,
            'logo' => '',
            'logo_url' => ''
        ];
        // 第一个参数:
        Getui::pushToSingle('notification', $data);
    }

```

##### 1-2 单推-通知打开链接

[](#1-2-单推-通知打开链接)

```
    $data = [
        'title' => '测试推送',
        'text' => '哈哈哈',
        'content' => '内容',
        'is_ring' => true,
        'is_vibrate' => true,
        'is_clearable' => true,
        'url' => 'http://www.juejin.im',
        'client_id' => 'c3024643a24c11bd3762d437c9103a42',
        'network_type' => 0
    ];

    Getui::pushToSingle('link', $data);

```

##### 1-3 单推-透传模板

[](#1-3-单推-透传模板)

```
		$data = [
            'network_type' => 0,
            'transmission_type' => 2,
            'client_id' => 'c3024643a24c11bd3762d437c9103a42',
            'content' => '透传内容-单推1'
        ];
        Getui::pushToSingle('transmission', $data);

```

#### 2 多推

[](#2-多推)

##### 2-1 多推-通知打开应用首页

[](#2-1-多推-通知打开应用首页)

```
        $data = [
            'client_id_list' => [
                'c3024643a24c11bd3762d437c9103a42',
            ],
            'network_type' => 0,
            'content' => '多推内容',
            'title' => '多推标题',
            'text' => '多推文本',
            'is_ring' => true,
            'is_vibrate' => true,
            'logo' => '',
            'logo_url' => ''
        ];

        Getui::pushToList('notification', $data);

```

##### 2-2 多推-通知模板-打开链接

[](#2-2-多推-通知模板-打开链接)

```
        $data = [
            'client_id_list' => [
                'c3024643a24c11bd3762d437c9103a42',
            ],
            'network_type' => 0,
            'title' => '多推连接标题',
            'text' => '多推连接文本',
            'is_ring' => true,
            'is_vibrate' => true,
            'is_clearable' => true,
            'url' => 'https://www.baidu.com'
        ];

        Getui::pushToList('link', $data);

```

##### 2-3 多推-透传消息

[](#2-3-多推-透传消息)

```
$data = [
    'network_type' => 0,
    'transmission_type' => 2,
    'client_id_list' => [
        'c3024643a24c11bd3762d437c9103a42'
    ],
    'content' => '透传内容-多推'
];
Getui::pushToList('transmission', $data);

```

#### 3 全量推送

[](#3-全量推送)

##### 3-1 全量推送-通知模板-打开链接

[](#3-1-全量推送-通知模板-打开链接)

```
$data = [
    'title' => '网页推送',
    'text' => '网页推送文本',
    'is_ring' => true,
    'is_vibrate' => true,
    'url' => 'http://www.baidu.com',
    'is_clearable' => true
];

Getui::pushToApp('link', $data);

```

##### 3-2 全量推送-通知模板-打开应用首页

[](#3-2-全量推送-通知模板-打开应用首页)

```
$data = [
    'title' => '测试推送12111',
    'text' => '哈哈哈1',
    'content' => '内容511121322',
    'is_ring' => true,
    'is_vibrate' => true,
    'logo' => '',
    'logo_url' => 'http://wwww.igetui.com/logo.png'
];

Getui::pushToApp('notification', $data);

```

##### 3-3 全量推送-透传-全量

[](#3-3-全量推送-透传-全量)

```
$data = [
    'transmission_type' => 2,
    'content' => '透传内容-全量6'
];
$res = Getui::pushToApp('transmission', $data);

```

##### 3-4 全量推送-透传模板-多推

[](#3-4-全量推送-透传模板-多推)

```
		$data = [
            'network_type' => 0,
            'transmission_type' => 2,
            'client_id_list' => [
                'c3024643a24c11bd3762d437c9103a42'
            ],
            'content' => '透传内容-多推1'
        ];
        Getui::pushToList('transmission', $data);

```

#### 4 自定义消息

[](#4-自定义消息)

##### 4-1 全量推送-自定义消息-透传模板

[](#4-1-全量推送-自定义消息-透传模板)

```
// 自定义数据
$content = '自定义消息文本1243';
$custom = [
    'keyId' => 1,
    'keyType' => 111199,
    'msg' => $content
];
$data = [
    'title' => '自定义消息标题-122',
    'transmission_type' => 2,
    'function' => 'json_encode',
    'content' => $content,
    'custom_data' => $custom,
    'custom_fields' => [
        'keyId', 'keyType'
    ],
    'speed' => 100, // 可选参数:定速推送 若设置100，则个推控制下发速度在100条/秒左右 默认无表示不定速.
];

Getui::pushToApp('transmission', $data);

```

##### 4-2 单推-自定义消息-透传模板

[](#4-2-单推-自定义消息-透传模板)

```
// 自定义数据
$content = [
    'keyId' => 1,
    'keyType' => 111199
];
$data = [
    'title' => '自定义消息iOS',
    'network_type' => 0,
    'transmission_type' => 2,
    'client_id' => 'c3024643a24c11bd3762d437c9103a42',
    'content' => json_encode($content) // 自定义数据加密 接收端需要按照同样方式解密
];
Getui::pushToSingle('transmission', $data);

```

##### 4-3 多推-自定义消息-透传模板

[](#4-3-多推-自定义消息-透传模板)

```
$data = [
    'title' => '自定义消息iOS',
    'network_type' => 0,
    'transmission_type' => 2,
    'client_id_list' => [
        'c3024643a24c11bd3762d437c9103a42'
    ],
    'content' => json_encode($content) // 自定义数据加密 接收端需要按照同样方式解密
];
Getui::pushToList('transmission', $data);

```

### 后续功能待添加

[](#后续功能待添加)

#### 1 消息撤回

[](#1-消息撤回)

#### 2 通知消息模板下载

[](#2-通知消息模板下载)

#### 3 实时设置配置信息等

[](#3-实时设置配置信息等)

#### v1.1.0 版本更新

[](#v110-版本更新)

```
调整iOS端推送 autoBadge = "+1" ,每次推送自动更新角标+1

```

#### v1.4.0 版本更新

[](#v140-版本更新)

```
修复安卓小米手机透传消息离线推送失败问题v2

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

1513d ago

### Community

Maintainers

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

---

Top Contributors

[![libaocai90](https://avatars.githubusercontent.com/u/393101?v=4)](https://github.com/libaocai90 "libaocai90 (15 commits)")

### Embed Badge

![Health badge](/badges/libaocai-laravel-getui/health.svg)

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

PHPackages © 2026

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