misaf/laravel-sms-gateway-vonage

Vonage SMS gateway driver for Laravel.

Maintainers

Package info

github.com/misaf/laravel-sms-gateway-vonage

pkg:composer/misaf/laravel-sms-gateway-vonage

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v3.0.0 2026-07-04 09:55 UTC

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