2017 © Pedro Peláez
 

library sms

An SMS sender for Laravel 5 with Notification Channel

image

kduma/sms

An SMS sender for Laravel 5 with Notification Channel

  • Saturday, February 10, 2018
  • by kduma
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

An SMS sender for Laravel 5 with Notification Channel

Latest Version on Packagist ![Software License][ico-license] Total Downloads, (*1)

An SMS sender for Laravel 5 with Notification Channel, (*2)

Install

Via Composer, (*3)

$ composer require kduma/sms

In Laravel 5.6, service provider is automatically discovered. If you don't use package discovery, add the Service Provider to the providers array in config/app.php:, (*4)

KDuma\SMS\SMSServiceProvider::class,

And following facade to facades array:, (*5)

'SMS' => KDuma\SMS\Facades\SMS::class,

Publish sms.php config file using following command:, (*6)

php artisan vendor:publish --provider="KDuma\SMS\SMSServiceProvider"

Now You can install and configure SMS channels and drivers. Configuration options are available in drivers readme's., (*7)

Available Drivers

Usage

``` php SMS::send('phone number', 'Message.'); SMS::balance(); SMS::driver('serwersms')->send('phone number', 'Message.');, (*8)


## Laravel 5.3 Notifications Channel Usage Follow Laravel's documentation to add the channel your Notification class, for example: ```php use Illuminate\Notifications\Notification; use KDuma\SMS\NotificationChannel\SMSChannel; use KDuma\SMS\NotificationChannel\SMSMessage; class NotificationSMSChannelTestNotification extends Notification { public function via($notifiable) { return [SMSChannel::class]; } public function toSMS($notifiable) { return SMSMessage::create('This is a test SMS sent via Simple SMS using Laravel Notifications!'); } }

Also you need to add a routeNotificationForSMS method to your Notifiable model to return the phone number, for example:, (*9)

public function routeNotificationForSMS()
{
    return $this->phone_number;
}

SMSMessage Available methods

  • content() - SMS content
  • channel() - Set the configured SMS channel

Credits

License

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

The Versions

10/02 2018

dev-master

9999999-dev

An SMS sender for Laravel 5 with Notification Channel

  Sources   Download

MIT

The Requires

 

10/02 2018

v1.0.1

1.0.1.0

An SMS sender for Laravel 5 with Notification Channel

  Sources   Download

MIT

The Requires

 

10/02 2018

v1.0

1.0.0.0

An SMS sender for Laravel 5 with Notification Channel

  Sources   Download

MIT

The Requires