Skip to content

Third-party HTTP SMS Gateway library for Laravel. Support zenziva, nusasms, smsgateway[dot]me

License

Notifications You must be signed in to change notification settings

sabrowi/laravel-sms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Sms

Third-party HTTP SMS Gateway library for Laravel. It supports zenziva, nusasms, smsgateway[dot]me by default. But you can extend it by just updating the config file.

Installation

composer require firmantr3/laravel-sms

Configuration

Register Service Provider (Laravel <= 5.4)

Add to your

<?php
return [
    'providers': [
        // Other Providers above
        Firmantr3\Sms\SmsServiceProvider::class,
    ],
];

Publish Config

php artisan vendor:publish --provider=Firmantr3\\Sms\\SmsServiceProvider

Update Config

Update your preferences in config/sms.php.

Usage

Sending Sms

<?php

use Firmantr3\Sms\Facade\Sms;

// send using default sms channel
Sms::text('test')->phone('081138702880')->send();

// send using particular sms channel
$sms = Sms::channel('zenziva')->text('test text zenziva')->phone('081138702880');
$sms->send();

// debug response data
print_r($sms->getResponse());

Test

vendor/bin/phpunit

About

Third-party HTTP SMS Gateway library for Laravel. Support zenziva, nusasms, smsgateway[dot]me

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%