Third-party HTTP SMS Gateway library for Laravel. It supports zenziva, nusasms, smsgateway[dot]me by default. But you can extend it by just updating the config file.
composer require firmantr3/laravel-sms
Add to your
<?php
return [
'providers': [
// Other Providers above
Firmantr3\Sms\SmsServiceProvider::class,
],
];
php artisan vendor:publish --provider=Firmantr3\\Sms\\SmsServiceProvider
Update your preferences in config/sms.php
.
<?php
use Firmantr3\Sms\Facade\Sms;
// send using default sms channel
Sms::text('test')->phone('081138702880')->send();
// send using particular sms channel
$sms = Sms::channel('zenziva')->text('test text zenziva')->phone('081138702880');
$sms->send();
// debug response data
print_r($sms->getResponse());
vendor/bin/phpunit