This package makes it easy to send notifications using playSMS with Laravel 5.5+ and 6.0
coreproc/laravel-notification-channel-playsms is a Laravel package for this package makes it easy to send notifications using playsms with laravel 5.5+ and 6.0.
It currently has 1 GitHub stars and 101 downloads on Packagist (latest version 1.0.0).
Install it with composer require coreproc/laravel-notification-channel-playsms.
Discover more Laravel packages by coreproc
or browse all Laravel packages to compare alternatives.
Last updated
This package makes it easy to send notifications using playSMS with Laravel 5.5+ and 6.0
Install this package with Composer:
composer require coreproc/laravel-notification-channel-playsms
A web server with playSMS installed is required to use this service. Visit https://help.playsms.org/en/ to check out set up / installation instruction for playSMS.
Once you have a playSMS server up and running, you can obtain an API key by going to My Account ->
User Configuration. You'll be able to see your webservices token in that page. Use this as your API key.
Add the base URL of your playSMS server, your username, and your API key to your config/services.php.
// config/services.php
....
'playsms' => [
'base_url' => env('PLAYSMS_BASE_URL'),
'username' => env('PLAYSMS_USERNAME'),
'api_key' => env('PLAYSMS_API_KEY'),
],
...
Sending a playSMS notification can be done by making a Notification class with the following:
use CoreProc\NotificationChannels\PlaySms\PlaySmsChannel;
use CoreProc\NotificationChannels\PlaySms\PlaySmsMessage;
use Illuminate\Notifications\Notification;
class AccountActivated extends Notification
{
public function via($notifiable)
{
return [PlaySmsChannel::class];
}
public function toPlaySms($notifiable)
{
return (new PlaySmsMessage())->setMessage('Your account has been activated!');
}
}
The PlaySmsMessage has only one method available as of now:
setMessage($message)
Use this method to set the content of the SMS being sent.
Please see CHANGELOG for more information what has changed recently.
$ composer test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see CONTRIBUTING for details.
CoreProc, Inc. is a software development company that provides software development services to startups, digital/ad agencies, and enterprises.
Learn more about us on our website.
The MIT License (MIT). Please see License File for more information.