PHPackages                             youxianbo/yii2-getui-v2 - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. youxianbo/yii2-getui-v2

ActiveYii2-extension[HTTP &amp; Networking](/categories/http)

youxianbo/yii2-getui-v2
=======================

GetuiPush extension for YII2

00PHP

Since Apr 22Pushed 3mo agoCompare

[ Source](https://github.com/youxianbo/yii2-getui-v2)[ Packagist](https://packagist.org/packages/youxianbo/yii2-getui-v2)[ RSS](/packages/youxianbo-yii2-getui-v2/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

基于个推RestAPI V2开发的Yii2扩展。
========================

[](#基于个推restapi-v2开发的yii2扩展)

本插件适用于uniapp开发的APP。其他框架开发的APP，需要修改intent参数。

因iOS不显示个推的通知消息，目前只有透传消息功能，如需个推通知消息功能可自行修改Push.php文件。

Installation 安装
---------------

[](#installation-安装)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer require --prefer-dist silentlun/yii2-getui-v2 "*"

```

or add

```
"silentlun/yii2-getui-v2": "*"

```

to the require section of your `composer.json` file.

使用方法
----

[](#使用方法)

### 1.配置组件 :

[](#1配置组件--)

```
    'components' => [
        'getui' => [
            'class' => 'silentlun\getui\Push',
            'appName' => 'com.xxx.app', //APP包名
            'appId' => 'xxxx', //个推APPID
            'appKey' => 'xxxxx', //个推APPKEY
            'masterSecret' => 'xxxxx', //个推masterSecret
            'host' => 'https://restapi.getui.com',
        ],
    ],
```

### 2.执行群推 pushToAll

[](#2执行群推-pushtoall)

```
    public function actionPush()
    {
        $data = [
            'title' => '系统通知标题',
            'body' => '系统通知内容',
            'payload' => [], //自定义参数
        ];

        $result = Yii::$app->getui->pushToAll($data);
        if ($result['code'] == 0) {
            echo 'success';
        } else {
            echo $result['msg'];
        }
    }

```

### 3.执行cid单推 pushToSingleByCid

[](#3执行cid单推-pushtosinglebycid)

```
    public function actionPush()
    {
        $data = [
            'title' => '系统通知标题',
            'body' => '系统通知内容',
            'payload' => [], //自定义参数
        ];
        $cid = 'd6d5f5df5d8e6b4eb9557bbdd98bb449';
        $result = Yii::$app->getui->pushToSingleByCid($cid, $data);
        if ($result['code'] == 0) {
            echo 'success';
        } else {
            echo $result['msg'];
        }
    }

```

### 4.执行cid批量推 pushToListByCid

[](#4执行cid批量推-pushtolistbycid)

```
    public function actionPush()
    {
        $data = [
            'title' => '系统通知标题',
            'body' => '系统通知内容',
            'payload' => [], //自定义参数
        ];
        $cids = [
            'd6d5f5df5d8e6b4eb9557bbdd98b34c9',
            'd6d5f5df5d8e6b4eb9557bbdd98b4444',
            'd6d5f5df5d8e6b4eb9557bbdd98b4444',
        ];

        $result = Yii::$app->getui->pushToListByCid($cids, $data);
        if ($result['code'] == 0) {
            echo 'success';
        } else {
            echo $result['msg'];
        }
    }

```

其他接口
----

[](#其他接口)

待完善。。。

###  Health Score

18

—

LowBetter than 7% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

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/04c70d07f668dcbe2b4a240876d824f8fc8b953f58c9bfdcc031fa72de6905ed?d=identicon)[youxianbo](/maintainers/youxianbo)

### Embed Badge

![Health badge](/badges/youxianbo-yii2-getui-v2/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25026.1M82](/packages/php-http-cache-plugin)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k122](/packages/httpsoft-http-message)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)[swoft/websocket-server

swoft websocket server component

16135.7k5](/packages/swoft-websocket-server)[thesis/nats

Async (fiber based) client for Nats.

754.4k](/packages/thesis-nats)[jasny/http-signature

Implementation of the IETF HTTP Signatures draft RFC

10104.7k](/packages/jasny-http-signature)

PHPackages © 2026

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