uithread/mgov-sms

SMS gateway package for mgov

1.0 2019-11-22 13:02 UTC

This package is auto-updated.

Last update: 2024-10-23 20:05:38 UTC


README

Latest Stable Version License: MIT

READY FOR USE!

About

Laravel mGovSMS Intergation package is for your Laravel or Lumen application. It has default sms log tables. Laravel mGovSMS is easily configurable and customizable. Supports Laravel 5.5, 5.6, 5.7, 5.8, and 6.0+

Features

Requirements

Laravel Installation Instructions

  1. From your projects root folder in terminal run:
    composer require uithread/mgov-sms
  1. Register the package Register the package, add the ServiceProvider in config/app.php:
    Uithread\MgovSMS\MgovSMSServiceProvider::class,
Add the Facade in config/app.php
    'MgovSMS' => Uithread\MgovSMS\Facades\MgovSMSFacade::class,
  1. Publish the packages config file and migration files by running the following from your projects root folder:
    php artisan vendor:publish --provider="Uithread\MgovSMS\MgovSMSServiceProvider"  
  1. Run the migration to add the table to sms log:
    php artisan migrate
  1. To send SMS use below method:
      use MgovSMS;
     
      MgovSMS::sendSingleSMS('MESSAGE Hello World!', '99########');
      MgovSMS::sendOtpSMS('MESSAGE Hello World!', '99########');
      MgovSMS::sendBulkSMS('MESSAGE Hello World!', '99########,98########');
      MgovSMS::sendSingleUnicode('MESSAGE Hello World!', '99########');
      MgovSMS::sendUnicodeOtpSMS('MESSAGE Hello World!', '99########');
      MgovSMS::sendBulkUnicode('MESSAGE Hello World!', '99########,98########');
      

Configuration

Laravel mGovSMS is configured in directly in /config/mgov-sms.php.

Configuration File

Here are the mgov-sms.php file variables available:

    'userName' => 'USER NAME',//username of the department
    'senderId' => 'SENDER ID',//password of the department
    'password' => 'PASSWORD',//senderid of the deparment
    'secureKey' => 'Generated Secure Key',// Secure key generated at https://services.mgov.gov.in/

File Tree

├── LICENSE
├── README.md
├── composer.json
└── src
    ├── MgovSMS.php
    ├── MgovSMSServiceProvider.php
    ├── config
    │   └── mgov-sms.php
    ├── Facades
    │   └── MgovSMSFacade.php
    ├── migrations
    │   └── 2019_08_20_083308_create_t_sms_logs_table.php
    └── Models
        └── TSmsLog.php

License

Laravel-logger is licensed under the MIT license. Enjoy!