PHP code example of adedaramola / laravel-sendchamp

1. Go to this page and download the library: Download adedaramola/laravel-sendchamp 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/ */

    

adedaramola / laravel-sendchamp example snippets


use Adedaramola\Sendchamp\Facades\Sendchamp;
use Adedaramola\Sendchamp\Http\Requests\SendSmsRequest;
use Adedaramola\Sendchamp\Http\Requests\CreateSenderIdRequest;

// Send an sms
Sendchamp::sms()->send(new SendSmsRequest(
    $to,
    $message,
    $sender_name,
    $route
));

// Create a new sender ID
Sendchamp::sms()->createSenderID(new CreateSenderIdRequest(
    $name,
    $sample,
    $use_case
));

// Get sms delivery report
Sendchamp::sms()->getDeliveryReport($sms_uid);

// Get bulk sms delivery report
Sendchamp::sms()->getBulkDeliveryReport($bulksms_uid);


use Adedaramola\Sendchamp\Facades\Sendchamp;
use Adedaramola\Sendchamp\Http\Requests\TextToSpeechRequest;
use Adedaramola\Sendchamp\Http\Requests\FileToVoiceRequest;

// text-to-speech
Sendchamp::voice()->textToSpeech(new TextToSpeechRequest(
    $customer_mobile_number,
    $message,
    $type,
    $repeat
));

// file-to-voice
Sendchamp::voice()->fileToVoice(new FileToVoiceRequest(
    $customer_mobile_number,
    $path,
    $type,
    $repeat
));

// Get delivery report
Sendchamp::voice()->getDeliveryReport();

use Adedaramola\Sendchamp\Facades\Sendchamp;
use Adedaramola\Sendchamp\Http\Requests\SendOtpRequest;

// send otp
Sendchamp::verification()->sendOtp(new SendOtpRequest(
    $channel,
    $sender,
    $token_type,
    $token_length
));

// verify otp
Sendchamp::verification()->confirmOtp(
    $verification_reference, $verification_code
);

use Adedaramola\Sendchamp\Facades\Sendchamp;

Sendchamp::whatsapp()->sendText();
Sendchamp::whatsapp()->sendVideo();
Sendchamp::whatsapp()->sendAudio();
Sendchamp::whatsapp()->sendSticker();

use Adedaramola\Sendchamp\Facades\Sendchamp;

// get your sendchamp wallet balance
Sendchamp::wallet()->getBalance();
bash
php artisan vendor:publish --config=