pixelvide / laravel-sms-gateway
Pixelvide SMS Gateway
Installs: 10 268
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Type:package
Requires
- php: ^7.3|^8.0
- ext-json: *
- aws/aws-sdk-php: ^3.184
- laravel/framework: ^6.0|^7.0|^8.0|^9.0|^10.0
Requires (Dev)
- orchestra/testbench: ^4|^5
README
This package allows us to send sms to SMS Gateway which will process and send message using sms service providers.
Installation
requires this package with composer:
composer require pixelvide/laravel-sms-gateway
Add following keys in .env file
key | value |
---|---|
SMS_GATEWAY_ENDPOINT | sms gateway url |
After installing SMS Gateway, you can use it to send sms.
- Using SMS Gateway.
$sms = new \Pixelvide\SMSGateway\SMS(); $sms->setTemplateId('01234567890'); $sms->addRecipient('1234567890'); $sms->addSubstitute('var1', 'Team'); # Optional $smsGw = new \Pixelvide\SMSGateway\SMSGateway(); $smsGw->send($sms)
$sms = new \Pixelvide\SMSGateway\SMS(); $sms ->setTemplateId('01234567890') ->addRecipient('1234567890'); $smsGw = new \Pixelvide\SMSGateway\SMSGateway(); $smsGw->send($sms)
Send SMS to multiple recipient.
$sms = new \Pixelvide\SMSGateway\SMS(); $sms ->setTemplateId('01234567890') ->addRecipient('1234567890') ->addRecipient('2345678901'); $smsGw = new \Pixelvide\SMSGateway\SMSGateway(); $smsGw->send($sms)