PHPackages                             mobile/push - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. mobile/push

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

mobile/push
===========

极光推送

1.0.0(8y ago)3252MITPHPPHP &gt;=7.0.0

Since Apr 12Pushed 2y agoCompare

[ Source](https://github.com/liutongke/mobpush)[ Packagist](https://packagist.org/packages/mobile/push)[ RSS](/packages/mobile-push/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

极光推送使用规则
========

[](#极光推送使用规则)

Installation 使用 Composer 安装 在项目中的 composer.json 文件中添加依赖：

```
“require”: {
    "mobile/push": "^1.0"
},
```

执行 $ composer update 进行安装。 引入

```
use \mobile\push\jpush\Jpush;
$app_key = '***';
$master_secret = '***';
$jpush = new Jpush($app_key, $master_secret);
```

通知别名推送(安卓)
----------

[](#通知别名推送安卓)

```
$jpush->setPlatform('android')
//设置别名
->addAlias($alias)
//推送的消息体,安卓调用androidNotification，iOS调用iosNotification
->androidNotification(
    [
        //这里指定了，则会覆盖上级统一指定的 alert 信息；内容可以为空字符串，则表示不展示到通知栏。
        "alert" => '山有木兮木有枝',
        //这里自定义 JSON 格式的 Key/Value 信息，以供业务使用
        'extras' => [
            'content' => '心悦君兮君不知',
            "badge" => (int)1,
        ]
    ])
->send();
```

通知别名推送(iOS)
-----------

[](#通知别名推送ios)

```
$jpush->setPlatform('ios')
//设置别名
->addAlias($alias)
//推送的消息体,安卓调用androidNotification，iOS调用iosNotification
->iosNotification(
    [
        //这里指定了，则会覆盖上级统一指定的 alert 信息；内容可以为空字符串，则表示不展示到通知栏。
        "alert" => '山有木兮木有枝',
        //这里自定义 JSON 格式的 Key/Value 信息，以供业务使用
        'extras' => [
            'content' => '心悦君兮君不知',
            "badge" => (int)1,
        ]
    ])
->send();
```

通知广播推送
------

[](#通知广播推送)

```
$jpush->setPlatform('all')
        ->addAllAudience()
        ->allNotification([
            //这里指定了，则会覆盖上级统一指定的 alert 信息；内容可以为空字符串，则表示不展示到通知栏。
            "alert" => '病起萧萧两鬓华',
            //这里自定义 JSON 格式的 Key/Value 信息，以供业务使用
            'android' => [
                'extras' => [
                    'content' => '卧看残月上窗纱',
                    "badge" => (int)1,
                ]
            ],
            'ios' => [
                "badge" => (int)2,
 //                   如果无此字段，则此消息无声音提示；有此字段，如果找到了指定的声音就播放该声音，否则播放默认声音,如果此字段为空字符串，iOS 7 为默认声音，iOS 8及以上系统为无声音。(消息) 说明：JPush 官方 API Library (SDK) 会默认填充声音字段。提供另外的方法关闭声音。
                "sound" => "",
                'extras' => [
                    'content' => '豆蔻连梢煎熟水',
                ]
            ],
        ])
        ->send();
```

送达统计
----

[](#送达统计)

```
$jreport = new Jreport($app_key, $master_secret);
$haha = $jreport->receivedUrl()
    ->received([
        '1654967444'
    ])
    ->send();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

2955d ago

### Community

Maintainers

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

---

Top Contributors

[![liutongke](https://avatars.githubusercontent.com/u/27773068?v=4)](https://github.com/liutongke "liutongke (39 commits)")

---

Tags

iosphppush-notifications

### Embed Badge

![Health badge](/badges/mobile-push/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

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

PHPackages © 2026

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