• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Xenon\LaravelBDSms is a laravel based multi sms gateway package for sending text message to Bangladeshi mobile numbers using several gateways like sslsms, greenweb, dianahost, metronet, boomcast, bulksmsbd, adn, mobireach, tense, banglalink. You can see installation from https://youtu.be/i2wjLNoIvIo

Xenon\LaravelBDSms is a sms gateway package for sending text message to Bangladeshi mobile numbers using several gateways for Laravel Framework. You can watch installation process from youtube.

Installation

Step 1:

composer require xenon/laravelbdsms

Step 2:

Then, publish the package

php artisan vendor:publish --provider=Xenon\LaravelBDSms\LaravelBDSmsServiceProvider

Step 3:

Select Vendor From Console

Step 4:

php artisan config:cache && php artisan migrate

Usage

Simply use the facade

Note: For sending message using facade you must have to set .env credentials. Find .env credentials for different providers from inside config/sms.php)

use Xenon\LaravelBDSms\Facades\SMS;

SMS::shoot('017XXYYZZAA', 'helloooooooo boss!');

SMS::shoot(['017XXYYZZAA','018XXYYZZAA'], 'helloooooooo boss!'); //for Ssl Sms Gateway Only

Or, with facade alias

use LaravelBDSms, SMS;

LaravelBDSms::shoot('017XXYYZZAA', 'helloooooooo boss!');
SMS::shoot('017XXYYZZAA', 'helloooooooo boss!');

Or, if you need to change the default provider on the fly

use Xenon\LaravelBDSms\Facades\SMS;
use Xenon\LaravelBDSms\Provider\Ssl;

$response = SMS::via(Ssl::class)->shoot('017XXYYZZAA', 'helloooooooo boss!');

That should do it.

Or, if you want to send message with queue. This queue will be added in your jobs table. Message will be sent as soon as job is run.

use Xenon\LaravelBDSms\Facades\SMS;
use Xenon\LaravelBDSms\Provider\Ssl;

SMS::shootWithQueue("01XXXXXXXXX",'test sms');
SMS::via(Ssl::class)->shootWithQueue("01XXXXXXXXX",'test sms');

That should do it.

Log Generate

You can generate log in database for every sms api request and save in database. For doing this. Follow below points

  1. Be confirm you have completed step-2 and step-3
  2. Run command php artisan migrate. This will create lbs_log table in your database
  3. Go to your project directory and locate config/sms.php
  4. Find and make true 'sms_log' => true,

Otherwise, if you want more control, you can use the underlying sender object. This will not touch any laravel facade or service provider.

Sample Code

SSLCommerz

use Xenon\LaravelBDSms\Provider\Ssl;
use Xenon\LaravelBDSms\Sender;

$sender = Sender::getInstance();
$sender->setProvider(Ssl::class); 
$sender->setMobile('017XXYYZZAA');
//$sender->setMobile(['017XXYYZZAA','018XXYYZZAA']);
$sender->setMessage('helloooooooo boss!');
$sender->setQueue(true); //if you want to sent sms from queue
$sender->setConfig(
   [
       'api_token' => 'api token goes here',
       'sid' => 'text',
       'csms_id' => 'sender_id'
   ]
);
$status = $sender->send();

Demo Response Using SSL

array:6 [â–ŧ
  "status" => "response"
  "response" => "{"status":"FAILED","status_code":4003,"error_message":"IP Blacklisted"}"
  "provider" => "Xenon\LaravelBDSms\Provider\Ssl"
  "send_time" => "2021-07-06 08:03:23"
  "mobile" => "017XXYYZZAA"
  "message" => "helloooooooo boss!"
]

MimSMS

use Xenon\LaravelBDSms\Provider\MimSms;
use Xenon\LaravelBDSms\Sender;

$sender = Sender::getInstance();
$sender->setProvider(MimSms::class);
$sender->setMobile('017XXYYZZAA');
$sender->setMessage('This is test message');
$sender->setQueue(true); //if you want to sent sms from queue
$sender->setConfig(
   [
       'api_key' => 'api_key_goes_here',
       'type' => 'text',
       'senderid' => 'approved_send_id',
   ]
);

$status = $sender->send();

Currently Supported SMS Gateways

Provider Credentials Required
For Sending SMS
Status Comment Contact
AjuraTech apikey, secretkey , callerID Done - -
Adn api_key, type, senderid Done - -
Banglalink userID, passwd , sender Done - -
BDBulkSMS token Done - -
BoomCast masking , userName , password Done - -
BulksmsBD api_key,senderid Done - -
DianaHost api_key, type, senderid Done - -
DianaSMS ApiKey, ClientId, SenderId Done - -
Esms api_token, sender_id Done - -
ElitBuzz api_key, type, senderid Done not tested yet in live -
Grameenphone username, password, messagetype Done not tested yet in live -
Infobip user, password Done not tested yet in live -
MDL api_key, type, senderid Done not tested yet in live -
Metronet api_key, mask Done - -
MimSms api_key, type, senderid Done - -
Mobireach Username,Password, From Done - -
NovocomBD ApiKey , ClientId , SenderId Done - -
OnnoRokomSMS userName, userPassword, type, maskName, campaignName Done not tested yet in live -
RedmoITSms api_token, sender_id Support closed -
SmartLabSMS user, password, sender Done - -
SmsinBD api_token, senderid Done -
SmsQ sender_id, client_id, api_key Done -
SMSNet24 user_id, user_password, route_id(optional), sms_type_id(optional) Done -
SmsNoc sender_id, bearer_token Done -
Sslsms api_token, sid, csms_id Done - -
Tense user, password, campaign, masking Done - -
TwentyFourSmsBD apiKey, sender_id Done - -
Trubosms api_token, sender_id Done - -
Viatech api_key, mask Done - -

Stargazers

Stargazers repo roster for @arif98741/laravelbdsms

Forkers

Forkers repo roster for @arif98741/laravelbdsms

Contributors


We are continuously working in this open source library for adding more Bangladeshi sms gateway. If you feel something is missing then make a issue regarding that. If you want to contribute in this library, then you are highly welcome to do that....

For clear documentation read this blog in Medium! and also you can download several sms providers documentations as pdf from this link!

Special thanks to
tusharkhan
tusher9352

More Repositories

1

nagadApi

This is Bangladeshi nagad payment gateway api development php sdk library. This library can be used in any php application.
PHP
38
star
2

multicourier

This is a courier api endpoints library for interacting such as ecourier, pathao, steadfast, redx etc. Specially built for laravel.
PHP
25
star
3

multisms

Xenon is a universal SMS sending library specially for Bangladesh. You can integrate this library in your PHP application easily for sending SMS to any Bangladeshi mobile number. This is for raw PHP.
PHP
15
star
4

bkash-php

Bkash PHP SDK for tokenized payment. You can easily integrate bkash php gateway in your web application using this package
PHP
13
star
5

laravelbash

This is for installing nginx, php and permission management for laravel deployment
Shell
8
star
6

mvc-pattern

This is a PHP library built with pure PHP and also MVC pattern is followed here. On the other hand libraries, validation, and helper functions are also available in this project
PHP
7
star
7

pos_git

Point of Sale(pos) is an online store management system where there are a lot of features for managing products, stock, customer, bill, sales, invoice, report, sms inform etc. Everything is maintained in a secured way to handle. Seller can get day to day or range to range report of sales, invoice, purchase etc. Every customer will get a sms notification their mobile after successfully buying products from the store as well. This software is built by using pure php, mysql, javascript, ajax and also adminLTE dashboard solutions.
PHP
7
star
8

paystation-sdk

xenon/paystation is a php library for Bangladeshi payment gateway provider. You can integrate this in your php application and get customer payment using mfs, credit card and so on
PHP
5
star
9

gitcom

Gitcom provides a data table for basic git commands. Git is a awesome tool for controlling version in software industry. Every time after changing codes it needs to save and record. For this git commands are necessary must. This is a public used most common and git command data table list for using easily.
JavaScript
4
star
10

exercise

This is php repository where I keep my php practice codes and share my knowledge with others.
PHP
2
star
11

final_question_solve_2019

IT is a repository of question solution for 10 semester student of DIU. I hope this will help you so much for understanding basic and advanced code that appeared in exams. If you any query just comment here https://github.com/arif98741/final_question_solve_2019/issues/1
PHP
2
star
12

codeigniter_crud

Codeigniter crud is an open source project where anyone can participate, edit, modify and use from this repository. If you want to improve or develop this free project then you are highly welcome. This project includes several features such as create, edit/modify, delete, multi-user rool , mailing forgot password etc.
PHP
2
star
13

activity-log

This is a repository for generating activity log from the sytem for laravel environment
PHP
1
star
14

firebase_php_app

Its a demo application for making web or such kind of application using most popular real time datbase, firebase.
PHP
1
star
15

mailtest

PHP
1
star
16

poster_project

HTML
1
star
17

oop_crud

This is repository for getting better idea about oop concept and usage. Here class, method, object and data validation are also included. For frontend design here I am using [email protected]. Any feature requests and pull request are granted with happiness. You can join
PHP
1
star
18

first_cakeapp

PHP
1
star
19

some_assembly_code

This is some assembly code of my practice during my university life. You can see it, find error and compile it with emu8086
Assembly
1
star
20

golf

CSS
1
star
21

guzzle-assistant

1
star
22

phpcourse

āĻĒāĻŋāĻāĻ‡āĻšāĻĒāĻŋ āĻ•ā§‹āĻ°ā§āĻ¸ā§‡āĻ° āĻ¸āĻ•āĻ˛ āĻ¸ā§‹āĻ°ā§āĻ¸ āĻ•ā§‹āĻĄ āĻ°āĻžāĻ–āĻžāĻ° āĻœāĻ¨ā§āĻ¯āĻ‡ āĻāĻ‡ āĻ°āĻŋāĻĒā§‹āĻ¸āĻŋāĻŸāĻ°āĻŋ āĻ“āĻĒā§‡āĻ¨ āĻ•āĻ°āĻž āĻšā§Ÿā§‡āĻ›ā§‡āĨ¤ āĻāĻ–āĻžāĻ¨ā§‡ āĻŸāĻŋāĻ‰āĻŸā§‹āĻ°āĻŋā§ŸāĻžāĻ˛ā§‡āĻ° āĻ¨āĻžāĻŽā§āĻŦāĻžāĻ° āĻ…āĻ¨ā§āĻ¯āĻžā§Ÿā§€ āĻ†āĻĒāĻ¨āĻŋ āĻ¸āĻšāĻœā§‡āĻ‡ āĻ¸ā§‹āĻ°ā§āĻ¸ āĻ•ā§‹āĻĄ āĻ–ā§āĻœā§‡ āĻ¨āĻŋāĻ¤ā§‡ āĻĒāĻžāĻ°āĻŦā§‡āĻ¨āĨ¤ āĻ•ā§‹āĻ¨ āĻĒā§āĻ°āĻ•āĻžāĻ° āĻĒā§āĻ°āĻļā§āĻ¨ āĻĨāĻžāĻ•āĻ˛ā§‡ āĻ…āĻŦāĻļā§āĻ¯āĻ‡ āĻœāĻžāĻ¨āĻžāĻ¨āĨ¤ āĻ…āĻĨāĻŦāĻž āĻ‡āĻŽā§‡āĻ˛āĻ“ āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡āĻ¨āĨ¤ āĻ¯ā§‹āĻ—āĻžāĻ¯ā§‹āĻ— āĻ•āĻ°āĻ¤ā§‡ āĻĒāĻžāĻ°ā§‡āĻ¨ āĻ†āĻŽāĻžāĻ° āĻ‡āĻ‰āĻŸāĻŋāĻ‰āĻŦā§‡āĻ° āĻ•āĻŽā§‡āĻ¨ā§āĻŸ āĻŦāĻ•ā§āĻ¸ā§‡āĻ“āĨ¤ āĻ‡āĻ‰āĻŸāĻŋāĻ‰āĻŦ āĻ˛āĻŋāĻ‚āĻ•āĻƒ https://www.youtube.com/channel/UCIoDbAdMtNye5uR3riRZZsA
PHP
1
star
23

slim_api

An open source slim api project for learning purpose. This is built using latest slim@4. Anyone can use it for learning and sharing. Using in production can be done by own risk
PHP
1
star
24

pos

Point of Sale(POS) is a sale management web application from where you can easily manage your products, suppliers, sales etcs. This app is still incomplete. You can download and modify it for your own purpose without concern of any license
PHP
1
star
25

xatbot

PHP
1
star
26

basic-c-programming-codes

This is a c programming code of basics such add,subtraction,operator,maximum minimum,case,loop etc. Here I have written all the codes in C language. For writting the program I have used codesblocks compiler. You can easily download and share files from here and I have made it free for all kinds of learners. But there is a request for you before starting with my code please give me a email at [email protected] I think it will help me to be inspired to work on different projectects. Best wishes for your learning exprience. I am ready to reply your question as soon I get email.
C
1
star