https://github.com/laravel-notification-channels/jusibe
Jusibe notifications channel for Laravel
https://github.com/laravel-notification-channels/jusibe
channels email jusibe jusibe-notifications laravel messaging notification-channel notifications phone sms
Last synced: 2 months ago
JSON representation
Jusibe notifications channel for Laravel
- Host: GitHub
- URL: https://github.com/laravel-notification-channels/jusibe
- Owner: laravel-notification-channels
- License: mit
- Created: 2016-08-14T15:33:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T01:33:08.000Z (about 5 years ago)
- Last Synced: 2024-08-28T12:37:16.379Z (10 months ago)
- Topics: channels, email, jusibe, jusibe-notifications, laravel, messaging, notification-channel, notifications, phone, sms
- Language: PHP
- Homepage: http://laravel-notification-channels.com
- Size: 24.4 KB
- Stars: 8
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Jusibe notifications channel for Laravel
[](https://packagist.org/packages/laravel-notification-channels/jusibe)
[](LICENSE.md)
[](https://styleci.io/repos/65673216)
[](https://travis-ci.org/laravel-notification-channels/jusibe)
[](https://scrutinizer-ci.com/g/laravel-notification-channels/jusibe)
[](https://scrutinizer-ci.com/g/laravel-notification-channels/jusibe/?branch=master)
[](https://packagist.org/packages/laravel-notification-channels/jusibe)This package makes it easy to send [Jusibe notifications](https://jusibe.com/docs/) with Laravel 5.5+, 6.x, & 7.x.
## Contents
- [Installation](#installation)
- [Setting up your Jusibe account](#setting-up-your-jusibe-account)
- [Usage](#usage)
- [Available Message methods](#available-message-methods)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)## Installation
You can install the package via composer:
``` bash
composer require laravel-notification-channels/jusibe
```You must install the service provider:
```php
// config/app.php
'providers' => [
...
NotificationChannels\Jusibe\JusibeServiceProvider::class,
],
```### Setting up your Jusibe account
Add your Jusibe Account Key, Acess Token, and From Number (optional) to your `config/services.php`:
```php
// config/services.php
...
'jusibe' => [
'key' => env('JUSIBE_PUBLIC_KEY'),
'token' => env('JUSIBE_ACCESS_TOKEN'),
'sms_from' => 'PROSPER'
],
...
```## Usage
Now you can use the channel in your `via()` method inside the notification:
``` php
use NotificationChannels\Jusibe\JusibeChannel;
use NotificationChannels\Jusibe\JusibeMessage;
use Illuminate\Notifications\Notification;class ValentineDateApproved extends Notification
{
public function via($notifiable)
{
return [JusibeChannel::class];
}public function toJusibe($notifiable)
{
return (new JusibeMessage())
->content("Your {$notifiable->service} account was approved!");
}
}
```In order to let your Notification know which phone number you are sending to, add the `routeNotificationForJusibe` method to your Notifiable model e.g your User Model
```php
public function routeNotificationForJusibe()
{
return $this->phone; // where `phone` is a field in your users table;
}
```### Available Message methods
#### JusibeMessage
- `from('')`: Accepts a phone to use as the notification sender.
- `content('')`: Accepts a string value for the notification body.## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Testing
``` bash
$ composer test
```## Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Credits
- [Prosper Otemuyiwa](https://github.com/unicodeveloper)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.