2017 © Pedro Peláez
 

library laravel-greenweb-sms-channel

Greenweb SMS Notifications driver for Laravel.

image

sikhlana/laravel-greenweb-sms-channel

Greenweb SMS Notifications driver for Laravel.

  • Friday, April 13, 2018
  • by sikhlana
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Greenweb SMS notifications channel for Laravel 5

This package makes it easy to send SMS notifications via Greenweb for Laravel 5. Greenweb only provides SMS service for Bangladeshi mobile operators., (*1)

Contents

Installation

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

``` bash composer require sikhlana/laravel-greenweb-sms-channel, (*3)


First you must install the service provider (skip for Laravel >= 5.5): ``` php // config/app.php 'providers' => [ ... Sikhlana\GreenwebSmsChannel\ServiceProvider::class, ],

Setting up the Greenweb service

Add your generated Greenweb SMS API key in your .env file:, (*4)

``` dotenv ... GREENWEB_SMS_TOKEN=, (*5)


## Usage Now you can use the channel in your `via()` method inside the notification: ``` php use Sikhlana\GreenwebSmsChannel\GreenwebChannel; use Sikhlana\GreenwebSmsChannel\GreenwebMessage; use Illuminate\Notifications\Notification; class AccountApproved extends Notification { public function via($notifiable) { return [GreenwebChannel::class]; } public function toGreenweb($notifiable) { return (new GreenwebMessage()) ->content("Your {$notifiable->service} account was approved!"); } }

In order to let your Notification know which phone are you sending/calling to, the channel will look for the phone_number attribute of the Notifiable model. If you want to override this behaviour, add the routeNotificationForGreenweb method to your Notifiable model., (*6)

php public function routeNotificationForGreenweb() { return '01765432109'; }, (*7)

Available Message methods

GreenwebMessage

  • content(string): Sets the message content.
  • line(string): Adds a line of text to the notification.

Changelog

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

Security

If you discover any security related issues, please email xoxo@saifmahmud.name instead of using the issue tracker., (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

Credits

License

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

The Versions

13/04 2018

dev-master

9999999-dev

Greenweb SMS Notifications driver for Laravel.

  Sources   Download

MIT

The Requires

 

laravel sms channel notifications greenweb

12/04 2018

v1.0.1

1.0.1.0

Greenweb SMS Notifications driver for Laravel.

  Sources   Download

MIT

The Requires

 

laravel sms channel notifications greenweb

12/04 2018

v1.0.0

1.0.0.0

Greenweb SMS Notifications driver for Laravel.

  Sources   Download

MIT

The Requires

 

laravel sms channel notifications greenweb