2017 © Pedro Peláez
 

library app-web-sms

Laravel Package to send notifications using AppWebSms

image

dubems/app-web-sms

Laravel Package to send notifications using AppWebSms

  • Saturday, November 18, 2017
  • by nriagudubem
  • Repository
  • 1 Watchers
  • 3 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AppWebSms notifications channel for Laravel 5.4

This package makes it easy to send AppWebSms notifications with Laravel 5.4., (*1)

Contents

Installation

You can install the package via composer:, (*2)

``` bash composer require dubems/app-web-sms, (*3)


You must install the service provider: ```php // config/app.php 'providers' => [ ... AppWebSms\AppWebSmsServiceProvider::class, ],

Setting up your AppWebSms account

Add your AppWebSms Account Name, Account Password, and Sender (The sender ID to show on receiver's phone) to your config/services.php:, (*4)

// config/services.php
...
'appwebsms' => [
    'username' => 'Your username',
    'password' => 'Your password',
    'sender'   => 'Dubem'
],
...

Usage

Now you can use the channel in your via() method inside the notification:, (*5)

``` php use AppWebSms\AppWebSmsChannel; use AppWebSms\AppWebSmsMessage; use Illuminate\Notifications\Notification;, (*6)

class ValentineDateApproved extends Notification { public function via($notifiable) { return [AppWebSmsChannel::class]; }, (*7)

public function toAppWebSms($notifiable)
{
    return (new AppWebSmsMessage('Your {$notifiable->service} account was approved!'));
}

}, (*8)


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 ```php public function routeNotificationForAppWebSms() { return $this->phone; // where `phone` is a field in your users table; }

Available Message methods

AppWebSmsMessage

  • 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.

Changelog

Please see CHANGELOG for more information what has changed recently., (*9)

Security

If you discover any security related issues, please email nriagudubem@gmail.com instead of using the issue tracker., (*10)

Contributing

Please see CONTRIBUTING for details., (*11)

Credits

License

The MIT License (MIT). Please see License File for more information., (*12)

The Versions

18/11 2017

dev-master

9999999-dev

Laravel Package to send notifications using AppWebSms

  Sources   Download

MIT

The Requires

 

by Nriagu Dubem

13/06 2017

v1.0

1.0.0.0

Laravel Package to send notifications using AppWebSms

  Sources   Download

MIT

The Requires

 

by Nriagu Dubem