1. Go to this page and download the library: Download abedin99/bulksms 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/ */
use Abedin99\Bulksms\Bulksms;
Route::get('/send-otp', function() {
$code = random_int(100000, 999999);
$number = "+880XXXXXXXXXX"; // with country and area code
$txt = "Hi, thanks for Joining. This is your verification code: {$code}";
$send = Bulksms::send($number, $txt);
return $send;
});