2017 © Pedro Peláez
 

library laravel-sms

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

image

matthewbdaly/laravel-sms

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  • Friday, November 10, 2017
  • by matthewbdaly
  • Repository
  • 1 Watchers
  • 13 Stars
  • 101 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 36 % Grown

The README.md

laravel-sms

Build Status, (*1)

SMS service provider for Laravel and Lumen. Uses SMS Client to enable sending SMS messages using the following drivers:, (*2)

  • nexmo
  • clockwork
  • textlocal
  • twilio
  • aws (requires installation of aws/aws-sdk-php)
  • mail (somewhat untested and may be too generic to be much use)

Also has the following drivers for testing purposes:, (*3)

  • log
  • null
  • requestbin

Installation for Laravel

This package is only intended for Laravel 5.5 and up. Install it with the following command:, (*4)

$ composer require matthewbdaly/laravel-sms

Then publish the config file:, (*5)

$ php artisan vendor:publish

You will need to select the service provider Matthewbdaly\LaravelSMS\LaravelSMSProvider. Then set your driver and any settings required in the .env file for your project:, (*6)

SMS_DRIVER=nexmo
NEXMO_API_KEY=foo
NEXMO_API_SECRET=bar
CLOCKWORK_API_KEY=baz
TEXTLOCAL_API_KEY=baz
REQUESTBIN_PATH=foo
AWS_SNS_API_KEY=foo
AWS_SNS_API_SECRET=bar
AWS_SNS_API_REGION=baz
MAIL_SMS_DOMAIN=my.sms-gateway.com
TWILIO_ACCOUNT_ID=foo
TWILIO_API_TOKEN=bar

Installation for Lumen

The installation process with Lumen is identical to that for Laravel, although if you wish to use the facade you will need to uncomment the appropriate section of bootstrap/app.php as usual., (*7)

Usage

Once the package is installed and configured, you can use the facade to send SMS messages:, (*8)

use SMS;

$msg = [
    'to'      => '+44 01234 567890',
    'content' => 'Just testing',
];
SMS::send($msg);

Or fetch it from the app:, (*9)

$msg = [
    'to'      => '+44 01234 567890',
    'content' => 'Just testing',
];
$sms = app()['sms']
$sms->send($msg);

Or resolve the interface Matthewbdaly\SMS\Contracts\Client:, (*10)

$msg = [
    'to'      => '+44 01234 567890',
    'content' => 'Just testing',
];
$sms = app()->make('Matthewbdaly\SMS\Contracts\Client');
$sms->send($msg);

Here we use the app() helper, but you'll normally want to inject it into a constructor or method of another class., (*11)

The Versions

10/11 2017

dev-master

9999999-dev

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel lumen sms

10/11 2017

1.0.5

1.0.5.0

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel lumen sms

05/11 2017

1.0.4

1.0.4.0

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel lumen sms

05/11 2017

1.0.3

1.0.3.0

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel lumen sms

05/11 2017

1.0.2

1.0.2.0

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel lumen sms

23/09 2017

1.0.1

1.0.1.0

A Laravel and Lumen integration for matthewbdaly/sms-client to enable sending SMS messages

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel lumen sms

23/09 2017