Package Data | |
---|---|
Maintainer Username: | nriagudubem |
Maintainer Contact: | nriagudubem@yahoo.com (Nriagu Dubem) |
Package Create Date: | 2017-01-24 |
Package Last Update: | 2017-11-18 |
Home Page: | https://www.appwebsms.com/ |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-09 15:10:47 |
Package Statistics | |
---|---|
Total Downloads: | 5 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This package makes it easy to send AppWebSms notifications with Laravel 5.4.
You can install the package via composer:
composer require dubems/app-web-sms
You must install the service provider:
// config/app.php
'providers' => [
...
AppWebSms\AppWebSmsServiceProvider::class,
],
Add your AppWebSms Account Name, Account Password, and Sender (The sender ID to show on receiver's phone) to your config/services.php
:
// config/services.php
...
'appwebsms' => [
'username' => 'Your username',
'password' => 'Your password',
'sender' => 'Dubem'
],
...
Now you can use the channel in your via()
method inside the notification:
use AppWebSms\AppWebSmsChannel;
use AppWebSms\AppWebSmsMessage;
use Illuminate\Notifications\Notification;
class ValentineDateApproved extends Notification
{
public function via($notifiable)
{
return [AppWebSmsChannel::class];
}
public function toAppWebSms($notifiable)
{
return (new AppWebSmsMessage('Your {$notifiable->service} account was approved!'));
}
}
In order to let your Notification know which phone number you are sending to, add the routeNotificationForAppWebSms
method to your Notifiable model e.g your User Model
public function routeNotificationForAppWebSms()
{
return $this->phone; // where `phone` is a field in your users table;
}
setMesssage('')
: Accepts a string value for the notification body.setSchedule('2017-01-13 10:30:04')
: Accepts a date-time string for when the notification should be sent.Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email nriagudubem@gmail.com instead of using the issue tracker.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.