Skip to content

tehCh0nG/channels

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signal notification channel for Laravel

Easily send end-to-end encrypted notifications for Laravel using Signal.

Contents

Installation

  1. Set up signal-cli

This package requires signal-cli to communicate with the Signal service. Precompiled binaries are available here.

Extract the binary file to a directory of your choice. Signal-cli requires JRE 7 or newer.

  1. Set your signal-cli and JAVA_HOME paths in SignalChannel.

  2. Register your phone number (username) with the Signal service:

./signal-cli --username +12345556789 register

Add your phone number (username) to .env:

SIGNAL_USERNAME="+12345556789" # Prefix ("+") and country code are required.

Usage

use NotificationChannels\Signal\SignalChannel;
use NotificationChannels\Signal\SignalMessage;
use Illuminate\Notifications\Notification;

class AccountCreated extends Notification
{
	use Queueable;

	public function via($notifiable)
	{
		return [SignalChannel::class];
	}

	public function toSignal($notifiable)
	{
		return (new SignalMessage())
			->message("This is a test Laravel notification message over Signal.")
			->recipient("+12345556789");
	}

Notifications will be sent to the recipient attribute of the Notifiable model.

Available Message methods

message 'string'

recipient 'string'

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email cjbarlow@protonmail.com 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.

About

Submit suggestions & pull requests here for new notification channels

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%