hoda/sms-driver

SMS package with multiple drivers

v0.1.0 2021-01-31 17:55 UTC

This package is auto-updated.

Last update: 2022-11-17 11:39:56 UTC


README

Codacy Badge Downloads

This package allows you to switch between drivers or use default driver from your config file.

Installation

This package can be used in Laravel 5.3 or higher.

You can install the package via composer:

composer require hoda/sms

The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php file:

'providers' => [
    // ...
    Hoda\SMS\SmsServiceProvider::class,
];

'aliases' => [
  'SMS'   =>  Hoda\SMS\SmsFacade::class,
];

Add config file

php artisan vendor:publish

Add your driver credential to env file

NEXMO_KEY=
NEXMO_SECRET=

usage

 SMS::channel('nexmo')->to('phone_number')->message('This your message')->send();

Test

 vendor/bin/phpunit tests