Send SMS using multiple gateways like(hisms, smsGateway, netPowers, ...).
composer require tahamohamed/smsgateway
Then create config file named smsgateway.php
in config
directory or you can use
php artisan vendor:publish --tag=smsgateway.config
You need to add credentials of gateway(s) in smsgateway.php
file that will use.
return [
/*
|--------------------------------------------------------------------------
| hisms App Credentials
|--------------------------------------------------------------------------
|
|
*/
'hisms' => [
'username' => env('SMS_HISMS_USERNAME',''),
'password' => env('SMS_HISMS_PASSWORD',''),
'sender' => env('SMS_HISMS_SENDER','')
],
/*
|--------------------------------------------------------------------------
| netpowers App Credentials
|--------------------------------------------------------------------------
|
|
*/
'netpowers' => [
'username' => env('SMS_NETPOWERS_USERNAME',''),
'password' => env('SMS_NETPOWERS_PASSWORD',''),
'sender' => env('SMS_NETPOWERS_SENDER','')
],
/*
|--------------------------------------------------------------------------
| smsgateway App Credentials
|--------------------------------------------------------------------------
|
|
*/
'smsgateway' => [
'username' => env('SMS_SMSGATEWAY_USERNAME',''),
'password' => env('SMS_SMSGATEWAY_PASSWORD',''),
'sender' => env('SMS_SMSGATEWAY_SENDER','')
],
];
# returns 'gateway config'
$gateway_sms = AppGateway::to(96651111111111)
// Or NetPowers::to(), Hisms::to()
// Or Add Multiple Numbers
->to([96650000000,96659999999])
->addDatetime(['date' => date('Y-m-d'), 'time' => date('H:i')])
->addMessage('asd asd asd');
# returns 'response from gateway'
$response = SMSGateway::send($gateway_sms);
Please see Hisms docs for more details.
# returns 'gateway config'
$gateway_sms = Hisms::changePassword('new_password');
// Or Hisms::forgetPassword();
// Or Hisms::deleteScheduleSMS();
// Or Hisms::getBalance();
# returns 'response from gateway'
$response = SMSGateway::send($gateway_sms);
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email taha.mohamed2016@gmail.com instead of using the issue tracker.
MIT. Please see the MIT for more information.