PHP code example of mitoop / laravel-jpush

1. Go to this page and download the library: Download mitoop/laravel-jpush library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mitoop / laravel-jpush example snippets


JPush::pushNow('别名', '通知', '附加信息');
JPush::pushNow(['别名数组'], '通知', '附加信息');
JPush::pushNow('all', '通知', '附加信息'); // 推送给所有人

JPush::pushQueue('别名', '通知', '附加信息');
JPush::pushQueue(['别名数组'], '通知', '附加信息');
JPush::pushQueue('all', '通知', '附加信息'); // 推送给所有人

    'jpush' => [
        // 极光 app kye 
        'app_key' => env('JPUSH_APP_KEY'), 
        // 极光 master secret
        'master_secret' => env('JPUSH_MASTER_SECRET'), 
        // 仅对iOS有效 开发环境设置为false 生产环境设置为true
        'apns_production' => env('JPUSH_APNS_PRODUCTION', false), 
        // 接口请求日志文件 为 null 不记录日志
        'log_file' => env('JPUSH_LOG_FILE'), 
    ],