tomdewit / skymobile
Skymobile notification channel for Laravel 5.5
Requires
- php: >=7.1
- guzzlehttp/guzzle: ^6.2
- illuminate/notifications: ^5.5
- illuminate/queue: ^5.5
- illuminate/support: ^5.5
Requires (Dev)
- mockery/mockery: ^0.9.5
- phpunit/phpunit: 4.*
This package is not auto-updated.
Last update: 2022-02-01 13:10:06 UTC
README
This package makes it easy to send Skymobile SMS notifications with Laravel 5.5.
Please note that the current documentation is out-of-sync with the package.
Full credit to Peter Steenbergen for his original work on Messagebird.
Contents
- Requirements
- Installation
- Setting up your Skymobile account
- Usage
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Requirements
You need a registered account with Skymobile since they don't accept new users.
Installation
You can install the package via composer:
composer require tomdewit/skymobile
You may install the service provider:
// config/app.php 'providers' => [ ... Tomdewit\Skymobile\SkymobileServiceProvider::class, ],
Setting up your Skymobile account
Add your Skymobile Access Key, Default originator (name or number of sender), and default recipients to your config/services.php
:
// config/services.php ... 'Skymobile' => [ 'access_key' => env('Skymobile_ACCESS_KEY'), 'originator' => env('Skymobile_ORIGINATOR'), 'recipients' => env('Skymobile_RECIPIENTS'), ], ...
Notice: The originator can contain a maximum of 11 alfa-numeric characters.
Usage
Now you can use the channel in your via()
method inside the notification:
use Tomdewit\Skymobile\SkymobileChannel; use Tomdewit\Skymobile\SkymobileMessage; use Illuminate\Notifications\Notification; class VpsServerOrdered extends Notification { public function via($notifiable) { return [SkymobileChannel::class]; } public function toSkymobile($notifiable) { return (new SkymobileMessage("Your {$notifiable->service} was ordered!")); } }
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Security
If you discover any security related issues, please email ttomdewit@gmail.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.