All Projects â†’ laravel-notification-channels â†’ pushover

laravel-notification-channels / pushover

Licence: MIT license
📱 Pushover notifications channel for Laravel

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to pushover

pushover-cli
pushover-cli is a command line client for https://pushover.net to send pushover notifications. Moreover it is possible with this client to pipe streams directly to your cellphone like tail -f /var/log/my.log | pushover-cli -
Stars: ✭ 38 (-17.39%)
Mutual labels:  pushover, pushover-notifications
pycameresp
Motion detection with image notification for Esp32CAM and Esp32 flasher with GUI based on esptool.py.
Stars: ✭ 40 (-13.04%)
Mutual labels:  pushover, pushover-notifications
smtp-translator
An SMTP server that converts emails into Pushover notifications.
Stars: ✭ 23 (-50%)
Mutual labels:  pushover, pushover-notifications
fylm
A wonderful automated command line app for organizing your film media. Built for Plex and SABnzbd.
Stars: ✭ 25 (-45.65%)
Mutual labels:  pushover
NPushOver
Full fledged, async, .Net Pushover client
Stars: ✭ 23 (-50%)
Mutual labels:  pushover
homebridge-messenger
Send HomeKit messages with HomeBridge (Pushover / IFTTT / Email)
Stars: ✭ 74 (+60.87%)
Mutual labels:  pushover
Laravel-pushover
A Laravel wrapper for Pushover. Pushover makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop (Pebble, Android Wear, and Apple watches, too!)
Stars: ✭ 49 (+6.52%)
Mutual labels:  pushover
log
A thin (and fast) PSR-3 logger.
Stars: ✭ 45 (-2.17%)
Mutual labels:  pushover
chump
Pushover.net client for Node.js
Stars: ✭ 19 (-58.7%)
Mutual labels:  pushover
magister-calendar
📅 Automatically plan your Magister appointments in your Google calendar.
Stars: ✭ 12 (-73.91%)
Mutual labels:  pushover
Pushover.NET
📣 .NET Wrapper for the Pushover API
Stars: ✭ 27 (-41.3%)
Mutual labels:  pushover
pushover
Go wrapper for the Pushover API
Stars: ✭ 112 (+143.48%)
Mutual labels:  pushover
ioBroker.backitup
Backitup enables the cyclical creation of backups of an IoBroker / Homematic installation
Stars: ✭ 43 (-6.52%)
Mutual labels:  pushover
indigo-pushover
Indigo plugin to send push notifications via Pushover.
Stars: ✭ 18 (-60.87%)
Mutual labels:  pushover
raspberrypi-boot
simple spring boot application running on raspberry pi measuring data via bmp085 sensor
Stars: ✭ 17 (-63.04%)
Mutual labels:  pushover
statapush
Stata module for sending push notifications.
Stars: ✭ 15 (-67.39%)
Mutual labels:  pushover
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (-23.91%)
Mutual labels:  pushover

Pushover notifications channel for Laravel

Latest Version on Packagist Software License Build Status StyleCI Quality Score Code Coverage Total Downloads

This package makes it easy to send Pushover notifications with Laravel Notifications.

Contents

Installation

You can install the package via composer:

composer require laravel-notification-channels/pushover

Setting up your Pushover account

To start sending messages via Pushover, you have to register an application. Add the generated Pushover application token to the services config file:

// config/services.php
...
'pushover' => [
    'token' => 'YOUR_APPLICATION_TOKEN',
],
...

Usage

Now you can use the channel in your via() method inside the notification as well as send a push notification:

use NotificationChannels\Pushover\PushoverChannel;
use NotificationChannels\Pushover\PushoverMessage;
use Illuminate\Notifications\Notification;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return [PushoverChannel::class];
    }

    public function toPushover($notifiable)
    {
        return PushoverMessage::create('The invoice has been paid.')
            ->title('Invoice paid')
            ->sound('incoming')
            ->lowPriority()
            ->url('http://example.com/invoices', 'Go to your invoices');
    }
}

Make sure there is a routeNotificationForPushover method on your notifiable model, for instance:

...
public function routeNotificationForPushover()
{
    return $this->pushover_key;
}

If you want to specify specific devices, you can return a PushoverReceiver object.

...
public function routeNotificationForPushover() {
    return PushoverReceiver::withUserKey('pushover-key')
        ->toDevice('iphone')
        ->toDevice('desktop')
        // or, if you prefer:
        ->toDevice(['iphone', 'desktop']);
}

If you want to (dynamically) overrule the application token from the services config, e.g. because each user holds their own application token, return a PushoverReceiver object like this:

...
public function routeNotificationForPushover() {
    return PushoverReceiver::withUserKey('pushover-key')
        ->withApplicationToken('app-token');
}

You can also send a message to a Pushover group:

...
public function routeNotificationForPushover() {
    return PushoverReceiver::withGroupKey('pushover-group-key');
}

Available Message methods

Please note that only the message content is mandatory, all other methods are optional. The message content can be set via content(''), via the create method PushoverMessage::create('') or via the constructor new PushoverMessage('').

Method Description
content($message) Accepts a string value for the message text.
html() Sets the message type to HTML.
monospace() Sets the message type to monospace.
plain() Sets the message type to plain text, this is the default.
title($title) Accepts a string value for the message title.
time($timestamp) Accepts either a Carbon object or a UNIX timestamp.
url($url[, $title]) Accepts a string value for a supplementary url and an optional string value for the title of the url.
sound($sound) Accepts a string value for the notification sound.
priority($priority[, $retryTimeout, $expireAfter]) Accepts an integer value for the priority and, when the priority is set to emergency, also an integer value for the retry timeout and expiry time (in seconds). Priority values are available as constants
lowestPriority() Sets the priority to the lowest priority.
lowPriority() Sets the priority to low.
normalPriority() Sets the priority to normal.
highPriority() Sets the priority to high.
emergencyPriority($retryTimeout, $expireAfter) Sets the priority to emergency and accepts integer values for the retry timeout and expiry time (in seconds).

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].