by-nativ/pushover
Composer 安装命令:
composer require by-nativ/pushover
包简介
Laravel 7 Pushover Package
README 文档
README
A Laravel 5 package for Android and iOS push notification service from https://pushover.net/.
**Please if you found any bug or you have any enhancement, You're so welcomed to open an Issue or make a pull request.
Content
Installation
If you still using laravel 4.1 use the 1.3.0 version
To get the latest version of dyaa/pushover simply require it in your composer.json file.
"dyaa/pushover": "dev-master"
After that, you'll need to run composer update to download the latest Version and updating the autoloader.
Or
composer require dyaa/pushover:dev-master
Once dyaa/pushover is installed, you need to register the Service Provider. To do that open app/config/app.php and add the following to the providers key.
'Dyaa\Pushover\PushoverServiceProvider',
Next you add this facade to app/config/app.php
'Dyaa\Pushover\Facades\Pushover',
To use this in your L5 application:
use Dyaa\Pushover\Facades\Pushover;
Configuration
Create app/config/pushover.php and fill it with your Token and the User Key from https://pushover.net/
return [ 'token' => 'App Token', 'user_key' => 'User Key', ];
Usage
Now you can use the package like that:
To Set a message (Required)
Pushover::push($title, $message);
To Set a Link (Optional)
Pushover::url($url, $title);
To Set a Callback (Optional)
Pushover::callback($callbackURL);
To Set a Sound (Optional) Supported Notification Sounds https://pushover.net/api#sounds
Pushover::sound($sound);
To Set a Device Name (Optional)
Pushover::device($device);
To Set if the Message should be sent as HTML (Optional) Default is 1
Pushover::html($html);
To Set a Timestamp (Optional) Default is time()
Pushover::timestamp($timestamp);
To Set Priority (Optional) For More Info about Priority https://pushover.net/api#priority
Pushover::priority($priority, $retry, $expire);
To turn the Debug mode (Optional)
Pushover::debug(true);
To Send the Message (Required)
Pushover::send();
All other information will be found in details here https://pushover.net/api
Commands
In the version 1.2.0 and above it supports the Artisan Commands but first make sure that you've done the Configuration correctly.
You can run
php artisan list
and you'll find
pushover
pushover:send Pushover Command
To send a pushover message you'll be able to use it like this way ( Title and Message are Required )
php artisan pushover:send YourTitle YourMessage
to turn on the debug mode just add
--debug
in the end of the Command line
to set a sound you can add "Optional"
--sound=YourSound
To know the supported sounds from here https://pushover.net/api#sounds
to set a Device name "Optional"
--device=YourDeviceName
to send a URL "Optional"
--url=http://www.example.com/
to set a title for the URL "Optional"
--urltitle=UrlTitle
to set a priority Message you can know more about the Priority Messages from here https://pushover.net/api#priority "Optional"
--priority=1
to set a priority retry (in seconds) Default is 60 "Optional"
--retry=60
to set a priority expire (in seconds) Default is 356 "Optional"
--expire=356
to set if message should be sent as HTML. Default is 1 "Optional" Note: Message body needs to be wrapped in quotes.
--html=1
License
Copyright (c) 2017 Dyaa Eldin Moustafa Licensed under the MIT license.
by-nativ/pushover 适用场景与选型建议
by-nativ/pushover 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「command」 「notification」 「laravel」 「pushover」 「artisan」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 by-nativ/pushover 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 by-nativ/pushover 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 by-nativ/pushover 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Wrapper for exec and it's results
Symfony bundle to monitor and execute commands
This package makes it easy to send notifications via AfricasTalking with Laravel
Shell command module for PHP.
Library with classes to help you do batch.
Apple Push Notification & Feedback Provider
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-10