cloudwal/laravel-infobip-sms

Sends SMS messages through the InfoBip V3 Api

v1.13 2024-10-23 21:23 UTC

This package is auto-updated.

Last update: 2024-10-23 21:24:38 UTC


README

Latest Version on Packagist run-tests Total Downloads

This is a very simple package to send sms messages through the InfoBip API.

Installation

You can install the package via composer:

composer require cloudwal/laravel-infobip-sms

You can publish the config file with:

php artisan vendor:publish --tag="laravel-infobip-sms-config"

This is the contents of the published config file:

return [
   'debug' => env('INFOBIP_DEBUG', true),
    'sender' => env('INFOBIP_SENDER', 'Laravel'),
    'from' => env('INFOBIP_FROM_NUMBER', '0123456789'),
    'username' => env('INFOBIP_USERNAME', 'user'),
    'password' => env('INFOBIP_PASSWORD', '123456'),
    'host' => env('INFOBIP_HOST', 'https://test.api.infobip.com'),
];

Usage

use CloudWales\LaravelInfobitSms\LaravelInfobipSms;

$response = new LaravelInfobipSms();

// Send an SMS
return $response->sendSms(['0123456789', '12345678901'], 'Test SMS message');

// Send WhatsApp Message
return $response->sendWhatsApp('0123456789', 'Test WhatsApp message');

// Get the delivery report of the message
return $response->getMessageReport($response['bulkId']);

Testing

composer test

Upcoming

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.