A package for push messages
shell
composer require loopeer/easypush
, (*1)
注册 ServiceProvider
和Facade
:, (*2)
Loopeer\EasyPush\Providers\EasyPushProvider::class, 'EasyPush' => \Loopeer\EasyPush\Facades\EasyPushFacade::class,
发布配置文件, (*3)
php artisan vendor:publish
发布后请修改app/config/easypush.php
中对应的配置项, (*4)
app('easypush')->pushToSingle($push, $title, $content, $custom); //或 EasyPush::pushToSingle($push, $title, $content, $custom);
app('easypush')->pushToList($pushes, $title, $content, $custom); //或 EasyPush::pushToList($pushes, $title, $content, $custom);
app('easypush')->pushToAll($title, $content, $custom); //或 EasyPush::pushToAll($title, $content, $custom);