PHPackages                             xenon/laravelbdsms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. xenon/laravelbdsms

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

xenon/laravelbdsms
==================

This is package for sending sms to Bangladeshi mobile numbers using laravel application

V1.0.67.0(3w ago)1528.5k↑125%56MITPHPPHP ^8.0CI passing

Since Jun 28Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/arif98741/laravelbdsms)[ Packagist](https://packagist.org/packages/xenon/laravelbdsms)[ Fund](https://www.buymeacoffee.com/arif98741)[ Patreon](https://www.patreon.com/arif98741)[ RSS](/packages/xenon-laravelbdsms/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (138)Used By (0)

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](https://youtu.be/i2wjLNoIvIo).

[![](https://camo.githubusercontent.com/cfde1fb26ef914b183aabb9cb92de64d58111a49a5c60270ab41b45dffec2ea9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6172696639383734312f6c61726176656c6264736d73)](https://camo.githubusercontent.com/cfde1fb26ef914b183aabb9cb92de64d58111a49a5c60270ab41b45dffec2ea9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6172696639383734312f6c61726176656c6264736d73)[![](https://camo.githubusercontent.com/b2f4aee03d3cbb2c4ea9a2d4c374fea3cf08cd852bd98b2d03b675d4adc39a9c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6172696639383734312f6c61726176656c6264736d73)](https://camo.githubusercontent.com/b2f4aee03d3cbb2c4ea9a2d4c374fea3cf08cd852bd98b2d03b675d4adc39a9c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6172696639383734312f6c61726176656c6264736d73)[![](https://camo.githubusercontent.com/60feddf7939fa14ca2405097eb0ab1a035da54b1b7eb98114b55baaed7f05dfc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6172696639383734312f6c61726176656c6264736d73)](https://camo.githubusercontent.com/60feddf7939fa14ca2405097eb0ab1a035da54b1b7eb98114b55baaed7f05dfc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6172696639383734312f6c61726176656c6264736d73) [![](https://camo.githubusercontent.com/ffdce4c618b4d7107d7dd2af0a69b70a6c1b105870bcabd802cc2ddd0e7ff073/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6172696639383734312f6c61726176656c6264736d73)](https://camo.githubusercontent.com/ffdce4c618b4d7107d7dd2af0a69b70a6c1b105870bcabd802cc2ddd0e7ff073/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6172696639383734312f6c61726176656c6264736d73)

- [Installation](#installation)
    - [Step 1:](#step-1)
    - [Step 2:](#step-2)
    - [Step 3:](#step-3)
    - [Step 4:](#step-4)
    - [Usage](#usage)
        - [Simply use the facade](#simply-use-the-facade)
        - [Or, with facade alias](#or-with-facade-alias)
        - [Or, if you need to change the default provider on the fly](#or-if-you-need-to-change-the-default-provider-on-the-fly)
        - [Or, you can send message with queue. This queue will be added in your jobs table. Message will be sent as soon as job is run.](#or-you-can-send-message-with-queue-this-queue-will-be-added-in-your-jobs-table-message-will-be-sent-as-soon-as-job-is-run)
- [Log Generate](#log-generate)
- [Sample Code](#sample-code)
    - [SSLCommerz](#sslcommerz)
    - [\]](#)
    - [Sms Send Using Custom Gateway](#sms-send-using-custom-gateway)
- [Currently Supported Sms Gateways](#currently-supported-sms-gateways)
    - [Stargazers](#stargazers)
    - [Forkers](#forkers)
    - [Contributors](#contributors)

Installation
============

[](#installation)

Step 1:
-------

[](#step-1)

```
composer require xenon/laravelbdsms

```

Step 2:
-------

[](#step-2)

Publish the package using command

```
php artisan vendor:publish --provider=Xenon\LaravelBDSms\LaravelBDSmsServiceProvider --tag="migrations"
php artisan vendor:publish --provider=Xenon\LaravelBDSms\LaravelBDSmsServiceProvider --tag="config"
php artisan migrate

```

Step 3:
-------

[](#step-3)

Select Vendor From Console
[![](https://raw.githubusercontent.com/arif98741/laravelbdsms/master/img/installation.png)](https://raw.githubusercontent.com/arif98741/laravelbdsms/master/img/installation.png)

Step 4:
-------

[](#step-4)

```
php artisan config:cache && php artisan migrate

```

Usage
-----

[](#usage)

### Simply use the facade

[](#simply-use-the-facade)

`Note: For sending message using facade you must have to set .env credentials and set default provider; 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!');
```

### Or, with facade alias

[](#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

[](#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!');
```

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

[](#or-you-can-send-message-with-queue-this-queue-will-be-added-in-your-jobs-table-message-will-be-sent-as-soon-as-job-is-run)

Make sure you have **jobs** table and other jobs related functionalities enabled

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

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

Log Generate
============

[](#log-generate)

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

1. Laravelbdsms stores log in two drivers(`database, file`). `database` is default. You can change it from *config/sms.php*
2. Find and make true `'sms_log' => true,`
3. Be confirm you have completed **step-2** and **step-3**
4. For `database` driver
    1. Change log driver to `log_driver =>'database'` from `config/sms.php`
    2. Run command `php artisan migrate`. This will create `lbs_log` table in your database
5. For `file` driver
    1. Change log driver to `log_driver =>'file'` from `config/sms.php`

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
===========

[](#sample-code)

SSLCommerz
----------

[](#sslcommerz)

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

$sender = Sender::getInstance();
$sender->setProvider(Ssl::class); //change this provider class according to need
$sender->setMobile('017XXYYZZAA');
//$sender->setMobile(['017XXYYZZAA','018XXYYZZAA']);
$sender->setMessage('helloooooooo boss!');
$sender->setQueue(false); //set 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!"
]
--------------------------------------------------
```

Sms Send Using Custom Gateway
-----------------------------

[](#sms-send-using-custom-gateway)

We have tried to add most of the gateways of Bangladesh in this package as much as possible. But still if you don't find your expected gateway in this list, then use Custom Gateway using following code snippet.

```
use Xenon\LaravelBDSms\Provider\CustomGateway;
use Xenon\LaravelBDSms\Sender;

$sender = Sender::getInstance();
$sender->setProvider(CustomGateway::class);
$sender->setUrl('https://your_cusom_gateway_provider_url_here')
        ->setMethod('post')
        ->setHeaders([
            'Content-Type: application/json',
            'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        ], false);
$sender->setMobile('017XXYYZZAA');
$sender->setMessage('text message goes here');
$sender->setQueue(false);
//use required parameters based on your sms gateway. This will be changed according to need
$sender->setConfig(
    [
        'MsgType' => 'TEXT',
        'masking' => 'sample',
        'userName' => 'test_user',
        'message' => 'test message',
        'receiver' => '017xxxxxxxxxx',
    ]
);
echo $status = $sender->send();
```

Currently Supported Sms Gateways
================================

[](#currently-supported-sms-gateways)

ProviderCredentials Required
 For Sending SMSSupport MultipleStatusCommentContactAjuraTechapikey, secretkey , callerID-DoneUses Reve SMS API (smpp.revesms.com)-Adnapi\_key, api\_secret, messsage\_type, request\_type-Done--Alphaapi\_keyYesDone--BanglalinkuserID, passwd , sender-Done--BDBulkSMStoken-Done--BoomCastmasking , userName , password-Done--BulksmsBDapi\_key,senderid-Done--BulkSmsDhakaapi\_key, callerID-Done--CustomGatewayprovide necessary token/api\_key/others based on requirements-DoneBe careful using this and test based on several scenario-DhorolaSmsapikey, sender-Done--DianaHostapi\_key, type, senderid-Done--DianaSMSApiKey, ClientId, SenderId-Done--DurjoySoftApiKey, SenderID-Done--EAmarsebax-app-key, x-app-secret, is\_masking, masking\_name-Done--ElitBuzzapi\_key, type, senderid, type-Donenot tested yet in live-Esmsapi\_token, sender\_id-Done--Grameenphoneusername, password, messagetype-Donenot tested yet in live-Infobipuser, password-Donenot tested yet in live-Lpeekacode, apiKey, requestID, masking-Done--MDLapi\_key, type, senderid-Donenot tested yet in live-Metronetapi\_key, maskDone--MimSmsApiKey, UserName, SenderName-Done--MobireachUsername,Password, From-Done--Muthofunsender\_idYesDone--NovocomBDApiKey , ClientId , SenderId-Done--OnnoRokomSMSuserName, userPassword, type, maskName, campaignName-Donenot tested yet in live-QuickSmsapi\_key, senderid, type,scheduledDateTime-Donenot tested yet in live-RedmoITSmsapi\_token, sender\_id-Support closed-Reve SMSapikey, secretkey , callerID-DoneUse AjuraTech provider for the Reve SMS-SendMySmsuser, closed-Donetested in liveSmartLabSMSuser, password, sender-Done--Sms4BDpublickey, privatekey, type,sender, delay-Done--SmsBangladeshuser, password, from-Done--SmsinBDapi\_token, senderid-Done-SMS.net.bdapi\_key-Done-SmsQsender\_id, client\_id, api\_key-Done-SMSNet24user\_id, user\_password, route\_id(optional), sms\_type\_id(optional)-Done-SmsNocsender\_id, bearer\_token-Done-SongBirdapikey, secretkey, callerID-Done-Sslsmsapi\_token, sid, csms\_idYesDone--Tenseuser, password, campaign, masking-Done--TmssIctapi\_key, request\_type, message\_type, campaign\_titleYesDoneEndpoint: `/api/v001/sent_sms` ()-Twenty4BulkSmsapi\_key, sender\_id,user\_email-Done--TwentyFourBulkSmsBDcustomer\_id, api\_key-Done--Trubosmsapi\_token, sender\_id-Done--Viatechapi\_key, mask-Done--WinTexttoken, messagetype, ismasking, masking-Done--ZamanITapi\_key, senderid,type-Done--### Stargazers

[](#stargazers)

[![Stargazers repo roster for @arif98741/laravelbdsms](https://camo.githubusercontent.com/8992f673fadcc45743f08ee77df6b0105bb8360ee71869e586340da689550362/68747470733a2f2f7265706f726f737465722e636f6d2f73746172732f6172696639383734312f6c61726176656c6264736d73)](https://github.com/arif98741/laravelbdsms/stargazers)

### Forkers

[](#forkers)

[![Forkers repo roster for @arif98741/laravelbdsms](https://camo.githubusercontent.com/dd2a4137e342d0b8adfd87006711ecd64f5f7d43fddd5c20a134e6ea87b0dd35/68747470733a2f2f7265706f726f737465722e636f6d2f666f726b732f6172696639383734312f6c61726176656c6264736d73)](https://github.com/arif98741/laravelbdsms/network/members)

### Contributors

[](#contributors)

[ ![](https://camo.githubusercontent.com/b2a301ea5c456b5d2379e772b0eca220141bd91ec3738898726775cf8a766a7b/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d6172696639383734312f6c61726176656c6264736d73)](https://github.com/arif98741/laravelbdsms/graphs/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!](https://send-sms-using-laravelbdsms.medium.com/laravel-sms-gateway-package-for-bangladesh-e70af99f2060)and also you can download several sms providers documentations as pdf from [this link!](https://github.com/arif98741/laravelbdsms/archive/refs/heads/doc.zip)

Special thanks to
[tusharkhan](https://github.com/tusharkhan)
[tusher9352](https://github.com/tusher9352)

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance92

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 89% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Recently: every ~30 days

Total

128

Last Release

26d ago

PHP version history (5 changes)v1.0.42.0PHP &gt;=7.2

v1.0.50.1PHP &gt;=7.3

v1.0.58.1PHP &gt;=7.4

V1.0.60.2PHP ^8.1

V1.0.64.5PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc7bf6cacc5223cb4f56412e5510ca049755722c6c4be46c9e759500332e094b?d=identicon)[arif98741](/maintainers/arif98741)

---

Top Contributors

[![arif98741](https://avatars.githubusercontent.com/u/17213478?v=4)](https://github.com/arif98741 "arif98741 (349 commits)")[![sim8568X](https://avatars.githubusercontent.com/u/124864642?v=4)](https://github.com/sim8568X "sim8568X (32 commits)")[![wddyousuf](https://avatars.githubusercontent.com/u/75154914?v=4)](https://github.com/wddyousuf "wddyousuf (2 commits)")[![mdhedayet](https://avatars.githubusercontent.com/u/70912615?v=4)](https://github.com/mdhedayet "mdhedayet (2 commits)")[![JimNewaz](https://avatars.githubusercontent.com/u/63665452?v=4)](https://github.com/JimNewaz "JimNewaz (1 commits)")[![aboutjubair](https://avatars.githubusercontent.com/u/34516927?v=4)](https://github.com/aboutjubair "aboutjubair (1 commits)")[![mehedijaman](https://avatars.githubusercontent.com/u/8464835?v=4)](https://github.com/mehedijaman "mehedijaman (1 commits)")[![Prantho-das](https://avatars.githubusercontent.com/u/54980155?v=4)](https://github.com/Prantho-das "Prantho-das (1 commits)")[![RaihanIIUC](https://avatars.githubusercontent.com/u/51045712?v=4)](https://github.com/RaihanIIUC "RaihanIIUC (1 commits)")[![ashikhasnat](https://avatars.githubusercontent.com/u/59171020?v=4)](https://github.com/ashikhasnat "ashikhasnat (1 commits)")[![HazzazBinFaiz](https://avatars.githubusercontent.com/u/29161993?v=4)](https://github.com/HazzazBinFaiz "HazzazBinFaiz (1 commits)")

---

Tags

alpha-smsbangladeshi-sms-gatewaybd-sms-gatewayboomcastbulksms-apibulksmsbdgateway-apiinfobipinfobip-apilaravel-smslaravel-sms-gatewayonnorokom-sms-servicephpphp-sms-gatewaysmssms-gatewaysms-gateway-packagesslcommerzsslcommerz-api-laravel

### Embed Badge

![Health badge](/badges/xenon-laravelbdsms/health.svg)

```
[![Health](https://phpackages.com/badges/xenon-laravelbdsms/health.svg)](https://phpackages.com/packages/xenon-laravelbdsms)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NotifyX、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

687114.3k8](/packages/guanguans-notify)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

254168.5k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
