PHPackages                             mofing/donews-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. mofing/donews-push

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

mofing/donews-push
==================

小米推送、魅族、华为推送、vivo、oppo、苹果推送。

v1.0.7(6y ago)0862↓25%MITPHPPHP &gt;=5.6.0

Since May 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wcj343169893/donews-push)[ Packagist](https://packagist.org/packages/mofing/donews-push)[ RSS](/packages/mofing-donews-push/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

DoNews APP推送 现在仅支持:华为，oppo，小米，vivo
==================================

[](#donews-app推送-现在仅支持华为oppo小米vivo)

安装
--

[](#安装)

```
composer require mofing/donews-push

```

配置
--

[](#配置)

- 本拓展包中使用 redis 保存 客户端Token
- 在自己的项目中设置全局变量CONFIG,用来存放.env全局变量

```
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
//具体按实际路径配置
if (!defined('DS')) {
	define('CONFIG', dirname(__DIR__) . DS . 'config' . DS);
}

```

.env配置文件设置

```
APP_PKG_NAME="com.xxx"
# redis
REDIS_HOST = "192.168.99.100"
REDIS_PORT = 6379
REDIS_PREFIX = "red_"
REDIS_DURATION = 3600
REDIS_DATABASE = 2

# push message
## huawei push
HUAWEI_CLIENT_ID=""
HUAWEI_CLIENT_SECRET=""
HUAWEI_APP_INTENT=""

## xiaomi push
XIAOMI_APP_SECRET=""
XIAOMI_APP_INTENT_URI=""
XIAOMI_APP_SEND_TYPE="alias"

## apple push
APNS_CERTIFICATE_PATH=""
APNS_CERTIFICATE_PASSPHRASE=""
APNS_ENVIRONMENT="sandbox"

## vivo push
VIVO_APP_ID=""
VIVO_APP_KEY=""
VIVO_APP_SECRET=""

## oppo push
OPPO_APP_KEY=""
OPPO_MASTER_SECRET=""
OPPO_MASTER_SECRET=""
OPPO_APP_SEND_TYPE="registration"
OPPO_APP_INTENT_URI="com.oppopush"

```

独立测试使用nginx+php5.6
------------------

[](#独立测试使用nginxphp56)

1.创建网站,配置访问

```
server
    {
        listen 80;
        server_name push.mofing.com ;
        index index.php;
        root  /home/wwwroot/www.push.com/webroot;

		location ~ [^/]\.php(/|$)
        {
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            fastcgi_param PHP_ADMIN_VALUE "open_basedir=/home/wwwroot/www.push.com/:/tmp/:/proc/";
        }

        access_log  /home/wwwlogs/www.push.com.log;
    }

```

2.配置本地host

```
127.0.0.1	www.push.com

```

3.访问地址 访问文件webroot/index.php

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Recently: every ~89 days

Total

8

Last Release

2191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ba50770ab3b983b6876cc5d96fb7915f8f1ff6efeb560de643d7c6948aa8f56?d=identicon)[wcj343169893](/maintainers/wcj343169893)

---

Top Contributors

[![wcj343169893](https://avatars.githubusercontent.com/u/502789?v=4)](https://github.com/wcj343169893 "wcj343169893 (12 commits)")

---

Tags

huaweipushoppopushvivopushxiaomipush

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)[eduardokum/laravel-mail-auto-embed

Library for embed images in emails automatically

1702.0M5](/packages/eduardokum-laravel-mail-auto-embed)

PHPackages © 2026

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