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

ActiveLibrary

octopusz/getui
==============

基于laravel和lumen框架的个推push推送包

v1.0(7y ago)26MITPHP

Since Mar 22Pushed 7y agoCompare

[ Source](https://github.com/ocotpusz/getui)[ Packagist](https://packagist.org/packages/octopusz/getui)[ RSS](/packages/octopusz-getui/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Laravel Or Lumen GeTui
======================

[](#laravel-or-lumen-getui)

基于 [个推官方SDK](http://docs.getui.com/getui/server/php/start/) for Laravel.

Installing
----------

[](#installing)

```
$ composer require octopusz/getui -v
```

### Laravel

[](#laravel)

```
// config/app.php

    'providers' => [
        //...
        Ocotpus\GeTui\GeTuiServiceProvider::class,    //This is default in laravel 5.5
    ],
```

And publish the config file:

```
$ php artisan vendor:publish --provider=Ocotpus\\GeTui\\GeTuiServiceProvider
```

if you want to use facade mode, you can register a facade name what you want to use, for example `GeTui`:

```
// config/app.php

    'aliases' => [
        'GeTui' => Ocotpus\GeTui\Facade\GeTui::class,   //This is default in laravel 5.5
    ],
```

### lumen

[](#lumen)

- 在 bootstrap/app.php 中 82 行左右：

```
$app->register(Ocotpus\GeTui\GeTuiServiceProvider::class);

```

将 `vendor/ocotpusz/getui/src/config/getui.php` 拷贝到项目根目录`/config`目录下，并将文件名改成`getui.php`。

### configuration

[](#configuration)

```
// config/getui.php
   // APP_EVN     你的项目当前环境：测试 or 生产
    'app_env' => env('APP_ENV', 'development'),

    // The default default_client name which configured in `development` or `production` section
    //默认推送的客户端
    'default_client' => 'client',

    'development' => [
        'client' => [
            'appid' => 'your appid', //个推后后台获取相应app的参数
            'appkey' => 'your appkey',
            'appsecret' => 'your appsecret',
            'mastersecret' => 'your mastersecret',
            'gt_domainurl' => 'http://sdk.open.api.igexin.com/apiex.htm',
        ],
        // other client   .....
    ],
    'production' => [
            'client' => [
                'appid' => 'your appid', //个推后后台获取相应app的参数
                'appkey' => 'your appkey',
                'appsecret' => 'your appsecret',
                'mastersecret' => 'your mastersecret',
                'gt_domainurl' => 'http://sdk.open.api.igexin.com/apiex.htm',
            ],
            // other client   .....
    ],

```

Usage
-----

[](#usage)

Gateway instance:

```
use GeTui;
//针对单个或者多个用户推送
GeTui::push($deviceId, $data,true) //Using default default_client   推送给默认的客户端
GeTui::toClient('CLIENT NAME')->push($deviceId, $data)  // CLIENT NAME is key name of `development` or `production`  configuration.  //自定义发送的客户端

// 针对整个app所有人推送
GeTui::pushToApp($data,true) ////Using default default_client
GeTui::toClient('CLIENT NAME')->pushToApp($data)  // GATEWAY NAME is key name of `development` or `production`  configuration.
```

Example:

```
    $deviceId = '111111111111111';
   // 多个push对象device_id 用数组传入
//   $deviceId = [
//            '111111111111111',
//            '222222222222222',
//           ];

   $data = [
                'url' => '推送的url',
                'title' => '这是个调皮的推送',
                'content' => '想啥有啥',
            ];
$res = \GeTui::push($deviceId, $data,true); //Using default default_client
print_r($res)
```

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

2609d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ac135e47d0894f43b6b59b20b81875d12cd3458c11e16a2110d9a73af811ea5?d=identicon)[octopusz](/maintainers/octopusz)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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