PHPackages                             doing/jpush - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. doing/jpush

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

doing/jpush
===========

极光app推送融入php,在框架thinkphp5.0里面运行效果最佳

040PHP

Since Feb 27Pushed 8y agoCompare

[ Source](https://github.com/Doing0/jpush)[ Packagist](https://packagist.org/packages/doing/jpush)[ RSS](/packages/doing-jpush/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

说明文档
====

[](#说明文档)

Jpush极光推送集成PHP使用说明
------------------

[](#jpush极光推送集成php使用说明)

> 别名是app端直接调极光的sdk去打别名:建议是用户在注册成时给用户打一个且项目里面唯一的别名:建议是id+时间戳

### composer 安装命令

[](#composer-安装命令)

composer require doing/jpush dev-master

### 1.去Jgconfig.php配置文件

[](#1去jgconfigphp配置文件)

### 2.调用推送 以别名推送为例

[](#2调用推送-以别名推送为例)

```
#把以下代码放在一个方法体内部。

#在使用前，文件顶部一定先引用命名空间
use Jpush\JpushSer;

//别名数组
$toJgs = ['a1','a2'];
$mess['title'] = '发送标题';
$mess['content'] = '发送正文';
//JpushSer里面的静态方法可根据业务需求自行扩展
$res = JpushSer::sendByAlias($toJgs, $mess);
if ($res == true)
{
    //TODO 写推送成功的逻辑
}else
{
    //TODO 写推送失败的逻辑
    //获取极光反的错误码
    print_r($res['code']);
    //获取极光反的错误提示信息
    print_r($res['messsage']);
}

```

### 额外说明

[](#额外说明)

此包写的比较有扩展性,更多的参数设置请去极光官网查看,根据业务需求酌情添加 [https://docs.jiguang.cn/jpush/server/push/rest\_api\_v3\_push/#audience](https://docs.jiguang.cn/jpush/server/push/rest_api_v3_push/#audience)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/100146bfe4881f02fc2f12b2fb50a4ec2f339233818ca8f5c52c6e8785946514?d=identicon)[Doing](/maintainers/Doing)

---

Top Contributors

[![Doing0](https://avatars.githubusercontent.com/u/36249980?v=4)](https://github.com/Doing0 "Doing0 (2 commits)")

### Embed Badge

![Health badge](/badges/doing-jpush/health.svg)

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

PHPackages © 2026

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