Download the PHP package qiaweicom/laravel-mipush without Composer

On this page you can find all versions of the php package qiaweicom/laravel-mipush. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mipush

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

安装方法

1、安装

composer require qiaweicom/laravel-mipush    
composer install

或

composer.json 中添加 "qiaweicom/laravel-mipush": "^1.0"  
composer update 

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

2、配置app.php

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

3、执行命令

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

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();

$sender = new Sender();

$res = $sender->broadcastAll($message)->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;

All versions of laravel-mipush with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
symfony/dom-crawler Version ~3.1
laravel/framework Version ~5.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qiaweicom/laravel-mipush contains the following files

Loading the files please wait ....