2017 © Pedro Peláez
 

library laravel-smsoffice

SMSOffice Channel for Laravel Notifications

image

zgabievi/laravel-smsoffice

SMSOffice Channel for Laravel Notifications

  • Saturday, September 30, 2017
  • by zgabievi
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

laravel-smsoffice

Latest Version on Packagist ![Software License][ico-license] Build Status ![Coverage Status][ico-scrutinizer] Quality Score StyleCI ![Total Downloads][ico-downloads], (*1)

Custom driver, SMSOffice, integration for Laravel Notifications, (*2)

Table of Contents

Install

Via Composer, (*3)

$ composer require zgabievi/laravel-smsoffice

If you do not run Laravel 5.5 (or higher), then follow next step:, (*4)

// config/app.php
'providers' => [
    ...
    Gabievi\LaravelSMSOffice\SMSOfficeServiceProvider::class,
],

If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider., (*5)

Optional you can publish the configuration to provide an own service provider stub., (*6)

php artisan vendor:publish --provider="Gabievi\LaravelSMSOffice\SMSOfficeServiceProvider"

Configuration

// config/services.php
...
'smsoffice' => [
    'key'  => env('SMSOFFICE_KEY'),
    'sender' => 'JOHN'
],
...

Usage

You can use the channel in your via() method inside the notification:, (*7)

``` php use Illuminate\Notifications\Notification; use Gabievi\LaravelSMSOffice\SMSOfficeMessage; use Gabievi\LaravelSMSOffice\SMSOfficeChannel;, (*8)

class Welcome extends Notification { // public function via($notifiable) { return [SMSOfficeChannel::class]; }, (*9)

//
public function toSMSOffice($notifiable)
{
    return SMSOfficeMessage::create('Welcome to the real world!');
}

}, (*10)


In your notifiable model, make sure to include a routeNotificationForSmsoffice() method, which return the phone number. ```php // public function routeNotificationForSmsoffice() { return $this->phone; }

Changelog

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

Testing

bash $ composer test, (*12)

Contributing

Please see CONTRIBUTING for details., (*13)

Security

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

Credits

License

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

The Versions

30/09 2017