Git Product home page Git Product logo

sms's Introduction

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']);  

Select the Gateway before sending the Message:-

//Gateways ::  Log / Clickatell / Gupshup / MVaayoo / SmsAchariya / SmsCountry / SmsLane / Custom
Sms::gateway('NameOfGateway')->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,
         ],

sms's People

Contributors

softon avatar tiipiik avatar

Stargazers

Andrew Ben RICHARD avatar

Watchers

James Cloos avatar Andrew Ben RICHARD avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.