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

ActiveLibrary

haixin/getui
============

getui for laravel

2.2(4y ago)021MITPHP

Since Jul 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sunmingyang/getui)[ Packagist](https://packagist.org/packages/haixin/getui)[ Docs](https://github.com/sunmingyang/getui)[ RSS](/packages/haixin-getui/feed)WikiDiscussions main Synced 1mo ago

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

GeTui
=====

[](#getui)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fab5fda9e58ab765cfe7869cf277d9b068d97cfddeec4f6d53c692d496a9cd47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616978696e2f67657475692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/haixin/getui)[![Total Downloads](https://camo.githubusercontent.com/7c44b2cacace1e56f8257617ac942f9f7ade10e39869cbab725506291c12a2e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616978696e2f67657475692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/haixin/getui)[![Build Status](https://camo.githubusercontent.com/d04bff4d9afdc32d47c5e5b639eb505478b5c42bb3f882c9fb9e473675ae4f90/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616978696e2f67657475692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/haixin/getui)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

路线图
---

[](#路线图)

略。。。

安装
--

[](#安装)

```
$ composer require haixin/getui
```

编辑 config/surl.php

```
artisan vendor:publish --provider="HaiXin\GeTui\GeTuiServiceProvider"
```

使用
--

[](#使用)

```
$pusher = resolve('getui');
```

### token

[](#token)

```
$token = $pusher->getToken();

// token缓存的 key
$token->key();

// 可以更换缓存的 key
$token->key($key);

// 获取 token
$token->get();

// 销毁 token (请求接口销毁)
$token->destroy();

// 非强制的话，重新从缓存加载。缓存不存在请求接口；强制的话直接请求接口
$token->refresh($force = false);
```

### alias

[](#alias)

```
$alias = $pusher->alias;

// 设备与别名绑定；单一绑定
$alias->bind(cid，alias));

// 设备与别名绑定；批量绑定
$alias->bind([cid => alias]);

// 根据设备查询别名
$alias->device(cid);

// 解除设备与别名的绑定关系
$alias->unbind(cid，alias);
$alias->unbind([cid => alias]);

// 解除所有与该别名绑定的设备
$alias->destroy([cid => alias]);
```

### tags

[](#tags)

```
$tags = $pusher->tags;

// 给指定设备绑定一批标签
$tags->single(cid, [tag1,tag2,tag3,...]);

// 一批设备绑定相同的一个标签
$tags->more(tag,[device1,device2,device3,...]);

// 一批设备解绑一个标签（指定设备解绑指定标签）
$tags->unbind(tag,[device1,device2,device3,...]);
```

### user

[](#user)

```
$user = $pusher->user;

$user->count(\HaiXin\GeTui\Helper\Filter $filter);
// 查询用户信息
$user->detail(device1,device2,device3,...);
$user->detail([device1,device2,device3,...]);

// 查询用户状态
$user->state(device1,device2,device3,...);
$user->state([device1,device2,device3,...]);

// 加入黑名单
$user->black(device1,device2,device3,...);
$user->black([device1,device2,device3,...]);

// 移除黑名单
$user->unblack(device1,device2,device3,...);
$user->unblack([device1,device2,device3,...]);

// 根据设备查询用户标签
$user->tags(device);

// 设置角标
$user->badge(badge, [device1,device2,device3,...]);
```

### report

[](#report)

```
$report = $pusher->report;

// 根据任务编号查询任务详情
$report->task(device1,device2,device3,...);

// 根据任务编号查询任务详情
$report->task([device1,device2,device3,...]);

// 根据任务组名查询任务详情
$report->group(group);

// 指定日期的推送数据
$report->day('2020-01-01');

// 今日已推送与剩余可用推送量
$report->remainder();

// 指定日期用户数据
$report->user('2020-01-01');

// 近24小时在线用户统计
$report->online();
```

### task

[](#task)

```
$task =$pusher->task;

// 停止任务
$task->stop(task);

// 定时任务状态
$task->state(task);

// 删除定时任务状态
$task->destroy(task);

// 指定任务下某设备的进度
$task->progress(device,task);
```

### filter

[](#filter)

```
$filter = new \HaiXin\GeTui\Helper\Filter();

// 仅支持以下 4种方式
// 'phone'=> 'phone_type',
// 'region' => 'region',
// 'portrait' => 'portrait',
// 'tag'=> 'custom_tag',
$filter->where('phone','ios')// and
 ->where('phone',['ios','android'])
 ->whereOr('phone','ios')// or
 ->whereNot('phone','ios')// not
 ->wherePhone('ios');// and
```

### message

[](#message)

```
$message = $pusher->message();

$message->title();
$message->body();
...
$pusher->message($message);

use HaiXin\GeTui\Helper\Message;
$pusher->message(function(Message $message){
  $message->title();
  $message->body();
  ...
});
```

### channel

[](#channel)

```
$channel = $pusher->channel();

$channel->title();
$channel->body();
...
$pusher->channel($channel);

use HaiXin\GeTui\Helper\Channel;
$pusher->channel(function(Channel $channel){
  $channel->title();
  $channel->body();
  ...
});
```

### audience

[](#audience)

```
$audience = $pusher->audience();

$audience->device($device);
$pusher->audience($audience);

use HaiXin\GeTui\Helper\Audience;
$pusher->audience(function(Audience $audience){
	$audience->device($device);
  ...
});
```

\###broadcast

```
$broadcast = $pusher->broadcast;

// 推送给全部用户
$broadcast->all->extras($extras)
  ->title($title)
  ->body($body)
  ->submit();

// 推送给指定标签的用户
$broadcast->tags->extras($extras)
  ->title($title)
  ->body($body)
  ->audience('标签','tags')
  ->submit();

// 推送给符合筛选条件的用户
$broadcast->filter->extras($extras)
  ->title($title)
  ->body($body)
  ->audience(\HaiXin\GeTui\Helper\Filter $filter)
  ->submit();
```

### group

[](#group)

```
$group = $pusher->group;

// 预创建消息
$task = $group->create->title('批量推')
  ->body('批量推')
  ->extras($extras)
  ->submit();

// 推送给指定设备
$group->device->audience([device1,device2,device3])
  ->task(task)
  ->submit();

// 推送给指定别名
group->alias->audience([device1,device2,device3])
  ->task(task)
  ->submit();
```

### single

[](#single)

```
$single = $pusher->single;

// 根据设备单推
$single->device->audience->device(device)
  ->title(title)
  ->body(body)
  ->extras(extras)
  ->submit();

// 根据别名单推
$single->alias->audience->device(device)
  ->title(title)
  ->body(body)
  ->extras(extras)
  ->submit();
```

### pipeline

[](#pipeline)

```
$pipeline = $pusher->pipeline;

// 批量单推给设备
$device = $pipeline->device;
for($index = 0; $index audience(device)
 ->title("title{$index}")
 ->body("body{$index}")
 ->delay();
}
$device->submit();

// 批量单推给别名
$alias = $pipeline->alias;
for($index = 0; $index audience(alias)
 ->title("title{$index}")
 ->body("body{$index}")
 ->delay();
}
$alias->submit();
```

更新日志
----

[](#更新日志)

[更新日志](changelog.md)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

4

Last Release

1761d ago

Major Versions

1.0 → 2.02021-07-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/19c48a559d2908d1697950ea07febb92b5437a4025bca5fdc1b2cd284b17ecf0?d=identicon)[sunmingyang](/maintainers/sunmingyang)

---

Top Contributors

[![sunmingyang](https://avatars.githubusercontent.com/u/5117842?v=4)](https://github.com/sunmingyang "sunmingyang (27 commits)")

---

Tags

laravelGeTui

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[tzsk/sms

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

320244.3k6](/packages/tzsk-sms)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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