misaf / laravel-sms-gateway-vonage
Vonage SMS gateway driver for Laravel.
Package info
github.com/misaf/laravel-sms-gateway-vonage
pkg:composer/misaf/laravel-sms-gateway-vonage
v3.0.0
2026-07-04 09:55 UTC
Requires
- php: ^8.3
- misaf/laravel-sms-gateway: ^3.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.10
- larastan/larastan: ^3.9.2
- laravel/pint: ^1.29
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.8.3
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.3.2
- pestphp/pest-plugin-laravel: ^4.0
This package is auto-updated.
Last update: 2026-07-04 09:55:21 UTC
README
Vonage SMS gateway driver for misaf/laravel-sms-gateway.
Installation
composer require misaf/laravel-sms-gateway-vonage
Laravel package discovery registers the driver service provider automatically.
Configuration
SMS_GATEWAY_DRIVER=vonage SMS_GATEWAY_VONAGE_APIKEY=your-api-key SMS_GATEWAY_VONAGE_API_SECRET=your-api-secret
// config/services.php 'vonage' => [ 'api_key' => env('SMS_GATEWAY_VONAGE_APIKEY'), 'api_secret' => env('SMS_GATEWAY_VONAGE_API_SECRET'), 'base_url' => env('SMS_GATEWAY_VONAGE_BASE_URL', 'https://rest.nexmo.com/'), ],
Driver Behavior
| Option | Value |
|---|---|
| Driver name | vonage |
| Default base URL | https://rest.nexmo.com/ |
send() endpoint |
POST sms/json |
| Authentication | api_key and api_secret query parameters from services.vonage.api_key and services.vonage.api_secret |
| Payload | Form data sent directly to Vonage |
Usage
use Misaf\LaravelSmsGateway\Facade\SmsGateway; $response = SmsGateway::driver('vonage')->send([ 'from' => 'Laravel', 'to' => '14155550100', 'text' => 'Hello from Vonage', ]);
The payload is passed directly to Vonage, so use the fields expected by the Vonage API.
Use request() when you need direct access to Laravel's HTTP client:
$request = SmsGateway::driver('vonage')->request();
Testing
composer test
composer analyse
License
MIT