All Projects → softon → sms

softon / sms

Licence: MIT License
Simple SMS Gateway Package for sending short text messages from your Application. Facade for Laravel 5(Updated to work with Laravel 5.5).Currently supported Gateways Clickatell, MVaayoo, Gupshup, SmsAchariya, SmsCountry, SmsLane, Nexmo, Mocker / Any HTTP/s based Gateways are supported by Custom Gateway. Log gateway can be used for testing.

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects

Projects that are alternatives of or similar to sms

pindo-cli
A simple Command Line Interface that allows you to authenticate with the Pindo API.
Stars: ✭ 32 (-21.95%)
Mutual labels:  sms-api, sms-messages, sms-gateway
sweetalert
Laravel 5 Package for SweetAlert2. Use this package to easily show sweetalert2 prompts in your laravel app.
Stars: ✭ 28 (-31.71%)
Mutual labels:  laravel-package, laravel-5-package, laravel55
artisan-shortcuts
🍰 Register shortcuts to execute multiple artisan commands
Stars: ✭ 56 (+36.59%)
Mutual labels:  laravel-package, laravel-5-package
Laravel-Unsplash-Wrapper
A Laravel wrapper for Unsplash API's.
Stars: ✭ 21 (-48.78%)
Mutual labels:  laravel-package, laravel-5-package
Nova-Dark-Theme
A dark theme for Laravel Nova
Stars: ✭ 72 (+75.61%)
Mutual labels:  laravel-package, laravel-5-package
laravel-ab
Laravel A/B experiment testing tool
Stars: ✭ 108 (+163.41%)
Mutual labels:  laravel-package, laravel-5-package
correios-consulta
Buscar informações de serviços dos correios diretamente nos sites deles, sem utilizar api de terceiros.
Stars: ✭ 155 (+278.05%)
Mutual labels:  laravel-package, laravel-5-package
maintenance-mode
An enhanced maintenance mode for Laravel.
Stars: ✭ 117 (+185.37%)
Mutual labels:  laravel-package, laravel-5-package
sms blitz
Send SMS messages through multiple different providers
Stars: ✭ 29 (-29.27%)
Mutual labels:  sms-api, sms-messages
messages-web
📱 SMS gateway using your own phone!
Stars: ✭ 34 (-17.07%)
Mutual labels:  sms-api, sms-gateway
smart-schema
A Laravel package to enable auto generation of forms
Stars: ✭ 18 (-56.1%)
Mutual labels:  laravel-package, laravel-5-package
laravel-sms-api
Laravel package to provide SMS API integration.
Stars: ✭ 84 (+104.88%)
Mutual labels:  laravel-package, sms-api
laravel-string-similarities
Compare two string and get a similarity percentage
Stars: ✭ 54 (+31.71%)
Mutual labels:  laravel-package, laravel-5-package
voyager-page-blocks
A module to provide page blocks for Voyager 📝
Stars: ✭ 80 (+95.12%)
Mutual labels:  laravel-package, laravel-5-package
voyager-portfolio
A Portfolio Module for Laravel Voyager 💋
Stars: ✭ 15 (-63.41%)
Mutual labels:  laravel-package, laravel-5-package
panichd
Ticketing system for Laravel 5.1 - 8.x. Allows to create new tickets via form only. Includes file attachments, ticket tags, filtering, scheduling and e-mail notifications.
Stars: ✭ 78 (+90.24%)
Mutual labels:  laravel-package, laravel-5-package
jasmin-web-panel
📨 Jasmin Web Panel for Jasmin SMS Gateway
Stars: ✭ 33 (-19.51%)
Mutual labels:  sms-api, sms-gateway
laravel-two-factor-authentication
A two-factor authentication package for Laravel >= 8
Stars: ✭ 37 (-9.76%)
Mutual labels:  laravel-package, laravel-5-package
flash
An easy way for Laravel flash notifications.
Stars: ✭ 14 (-65.85%)
Mutual labels:  laravel-package, laravel-5-package
devtube
Laravel YouTube and Online Video viewing and download interface.
Stars: ✭ 30 (-26.83%)
Mutual labels:  laravel-package, laravel-5-package

SMS

Simple SMS(Short Messaging Service) Gateway Package for sending short text messages from your Application. Facade for Laravel 5(Updated to work with Laravel 5.*).Currently supported Gateways Clickatell, MVaayoo, Gupshup, SmsAchariya, SmsCountry, SmsLane, Nexmo, Mocker, MSG91 / 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
     composer require softon/sms 
  2. (Optional for Laravel 5.5+) Add the service provider to the config/app.php file in Laravel
     Softon\Sms\SmsServiceProvider::class, 
  3. (Optional for Laravel 5.5) Add an alias for the Facade to the config/app.php file in Laravel
     'Sms' => Softon\Sms\Facades\Sms::class, 
  4. Publish the config & views by running
     php artisan vendor:publish --provider="Softon\Sms\SmsServiceProvider" 

Usage

Edit the config/sms.php. Set the appropriate Gateway and its parameters. Then in your code...
Put your blade template for the SMS in the resources/views/sms folder. Then use the below lines of code to send SMS.

use Softon\Sms\Facades\Sms;  

Send Single SMS with View:-

// Params: [MobileNumber,Blade View Location,SMS Params If Required]
Sms::send('9090909090','sms.test',['param1'=>'Name 1']);  

Send Single SMS with Raw Message:-

// Params: [MobileNumber,Blade View Location,SMS Params If Required]
Sms::send('9090909090','Any Message Text To be sent.');  

Send Multiple SMS:-

// Params: [Array of MobileNumbers,Blade View Location,SMS Params If Required]
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 / 
              nexmo / msg91 / mocker / custom 
*****************************************************/

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

With Response:-

// This command gives you the reply recieved from the server.
Sms::send(['87686655455','1212121212','2323232323'],'sms.test',['param1'=>'Name 1'])->response();  

Custom Gateway Let us suppose you want to use any other gateway. Find the API url with which sms can be sent. For Example : http://example.com/api/sms.php?uid=737262316a&pin=YOURPIN&sender=your_sender_id&route=0&mobile=8888888888&message=How are You&pushid=1

Then you can setup the Config of Custom Gateway like this:

        'custom' => [                           // Can be used for any gateway
            'url' => '',                        // Gateway Endpoint
            'params' => [                       // Parameters to be included in the request
                'send_to_name' => 'mobile',           // Name of the field of recipient number
                'msg_name' => 'message',               // Name of the field of Message Text
                'others' => [                   // Other Authentication params with their values
                    'uid' => '737262316a',
                    'pin' => 'YOURPIN',
                    'sender' => 'your_sender_id',
                    'route' => '0',
                    'pushid' => '1',
                ],
            ],
            'add_code' => true,                 // Append country code to the mobile numbers
        ],
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].