Skip to content

shihabEK/Sms-Gateway-Handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub issues GitHub forks GitHub stars GitHub license GitHub All Releases Twitter

SMS Gateway Handler

This Laravel Package will helpto send SMS through various SMS Gateways simpler than ever.

Supported Gateways

  1. MSG91
  2. TextLocal

Installation

  1. Include the package in your project

    composer require "shaab/sms"
    
  2. Add the service provider to your config/app.php providers array:

    If you're installing on Laravel 5.5+ skip this step

    • Add providers
      shaab\sms\SmsServiceProvider::class,
      
    • Add Aliase
      'SMS'   =>  shaab\sms\Facades\sms::class,
      
  3. Publish the Vendor Config files by running:

    php artisan vendor:publish --provider="shaab\sms\SmsServiceProvider"
    
    • Config the SMS Gateway in Config/sms.php.

Usage

  1. Add Facade to the controller:

    use shaab\sms\Facades\sms;
    
  2. Call Send function

    • Minimal

      Syntax: SMS::send($to,$message);

      SMS::send(9567######,"Thank you!");
      

      to: Single mobile number or an array of numbers

      Note: Its basic function in the package.

    • Advanced

      using Trait

      --In development--

  3. Check SMS Balance

    • MSG91

      Syntax: SMS::msg91_balance(Route);

      SMS::msg91_balance(4);
      

      Output: Return sms balance in given route.

    • TextLocal

      SMS::textlocal_balance();
      

      Output: Return sms balance in given route.

About

This Laravel Package will helpto send SMS through various SMS Gateways simpler than ever

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages