Skip to content
forked from softon/sms

SMS Package for Laravel 5. Clickatell, MVaayoo, Gupshup, SmsAchariya, SmsCountry, SmsLane and any custom gateway supported.

License

Notifications You must be signed in to change notification settings

CyberiaResurrection/sms

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sms

Simple SMS Gateway Package for sending short text messages from your Application. Facade for Laravel 5.Currently supported Gateways Clickatell, MVaayoo, Gupshup, SmsAchariya, SmsCountry, SmsLane / Any HTTP/s based Gateways are supported by Custom Gateway. Log gateway can be used for testing.

Installation

  1. Edit the composer.json add to the require array & run composer update
     "softon/sms": "dev-master" 
     composer update 
  2. Add the service provider to the config/app.php file in Laravel
     'Softon\Sms\SmsServiceProvider', 
  3. Add an alias for the Facade to the config/app.php file in Laravel
     'Sms' => 'Softon\Sms\Facades\Sms', 
  4. Publish the config & views by running
     php artisan vendor:publish 

Usage

Edit the config/sms.php. Set the appropriate Gateway and its parameters. Then in your code...

 use Softon\Sms\Facades\Sms;  

Send Single SMS:-

 Sms::send('9090909090','sms.test',['param1'=>'Name 1']);  

Send Multiple SMS:-

 Sms::send(['87686655455','1212121212','2323232323'],'sms.test',['param1'=>'Name 1']);  

With Response:-

 Sms::send(['87686655455','1212121212','2323232323'],'sms.test',['param1'=>'Name 1'])->response();  

Custom Gateway

Actual Url : http://example.com/api/sms.php?uid=737262316a&pin=YOURPIN&sender=your_sender_id&route=0&mobile=MOBILE&message=MESSAGE&pushid=1

Config of Custom Gateway :

 
        'custom' => [                           
             'url' => 'http://example.com/api/sms.php?',
             'params' => [
                 'send_to_name' => 'mobile',
                 'msg_name' => 'message',
                 'others' => [
                     'uid' => '737262316a',
                     'pin' => 'YOURPIN',
                     'sender' => 'your_sender_id',
                     'route' => '0',
                     'pushid' => '1',
                 ],
             ],
             'add_code' => true,
         ],
 

About

SMS Package for Laravel 5. Clickatell, MVaayoo, Gupshup, SmsAchariya, SmsCountry, SmsLane and any custom gateway supported.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%