PHP code example of cloudwal / laravel-infobip-sms

1. Go to this page and download the library: Download cloudwal/laravel-infobip-sms library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cloudwal / laravel-infobip-sms example snippets


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'),
];

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']);

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