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

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

qq175023117/laravel-mi-push
===========================

php laravel mi-push

1.2.1(7y ago)56.9kMITPHPPHP &gt;=7.0.0CI failing

Since Jul 5Pushed 6y agoCompare

[ Source](https://github.com/WXiangQian/laravel-mi-push)[ Packagist](https://packagist.org/packages/qq175023117/laravel-mi-push)[ RSS](/packages/qq175023117-laravel-mi-push/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

laravel-mi-push基于laravel5.5的小米推送
================================

[](#laravel-mi-push基于laravel55的小米推送)

安装方法
====

[](#安装方法)

### 1、安装

[](#1安装)

```
composer require qq175023117/laravel-mi-push
composer install

```

```
因刚改完GitHub用户名原因,require时要引入以前的
qq175023117/laravel-mi-push
后续联系客服看看能否改成
WXiangQian/laravel-mi-push
在这里给大家说声抱歉

```

如果无法安装 请执行一下 composer update nothing 然后 composer update

### 2、配置app.php

[](#2配置appphp)

```
在config/app.php 'providers' 中添加 \Qian\MiPush\MiPushServiceProvider::class,

```

### 3、执行命令

[](#3执行命令)

```
php artisan config:cache 清空配置缓存
php artisan vendor:publish

```

### 5、配置文件

[](#5配置文件)

```
config/mipush.php

```

实例
==

[](#实例)

### 安卓初始化以及基本配置

[](#安卓初始化以及基本配置)

```
$secret = config('mipush.android.app_secret');
$package = config('mipush.android.bundle_id');
Constants::setSecret($secret);//AppSecret
Constants::setPackage($package);//包名

$message = new Builder();
$message->title($title);  // 通知栏的title
$message->description($description); // 通知栏的descption
$message->passThrough(0);  // 这是一条通知栏消息，如果需要透传，把这个参数设置成1,同时去掉title和descption两个参数
$message->payload($payload); // 携带的数据，点击后将会通过客户端的receiver中的onReceiveMessage方法传入。
$message->extra(Builder::notifyEffect, 1); // 此处设置预定义点击行为，1为打开app
$message->extra(Builder::notifyForeground, 1); // 应用在前台是否展示通知，如果不希望应用在前台时候弹出通知，则设置这个参数为0
$message->notifyId(2); // 通知类型。最多支持0-4 5个取值范围，同样的类型的通知会互相覆盖，不同类型可以在通知栏并存
$message->build();

```

##### 安卓topic发送

[](#安卓topic发送)

```
先插入安卓初始化以及基本配置

$sender = new Sender();

$res = $sender->broadcast($message, $topic)->getRaw();
return $res;

```

##### 安卓根据alias推送

[](#安卓根据alias推送)

```
 先插入安卓初始化以及基本配置

$sender = new Sender();
$res = $sender->sendToAlias($message, $alias)->getRaw();
return $res;

```

### 苹果初始化以及基本配置

[](#苹果初始化以及基本配置)

```
$secret = config('mipush.ios.app_secret');
$package = config('mipush.ios.bundle_id');
Constants::setSecret($secret);//AppSecret
Constants::setPackage($package);//包名

 // Constants::useSandbox(); //此代码为测试环境添加

 $message = new IOSBuilder();
 $message->title($title);
 $message->body($Description);
 $message->soundUrl('default');
 $message->badge('-1');
 $message->extra('payload', $Payload);
 $message->build();

```

##### 苹果全局发送

[](#苹果全局发送)

```
 先插入苹果初始化以及基本配置
 $sender = new Sender();

 $res = $sender->broadcastAll($message)->getRaw();
 return $res;

```

##### 苹果根据alias推送

[](#苹果根据alias推送)

```
 先插入苹果初始化以及基本配置

$sender = new Sender();
$res = $sender->sendToAlias($message,$alias)->getRaw();
return $res;

```

#### 暂时四个方法可以满足基本需求，如有需要，欢迎大家提交问题

[](#暂时四个方法可以满足基本需求如有需要欢迎大家提交问题)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community6

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

Total

3

Last Release

2917d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/33483107?v=4)[WXiangQian](/maintainers/WXiangQian)[@WXiangQian](https://github.com/WXiangQian)

---

Top Contributors

[![WXiangQian](https://avatars.githubusercontent.com/u/33483107?v=4)](https://github.com/WXiangQian "WXiangQian (18 commits)")

---

Tags

composerlaravellaravel-milaravel-mipushlaravel mi-push

### Embed Badge

![Health badge](/badges/qq175023117-laravel-mi-push/health.svg)

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

###  Alternatives

[spatie/laravel-export

Create a static site bundle from a Laravel app

673139.5k6](/packages/spatie-laravel-export)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

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