1. Go to this page and download the library: Download zenapply/laravel-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/ */
# Send many texts with different messages
$items = [
["msg"=>"Hello Rick!", "to"=>"+15556667777","from"=>"+17776665555"],
["msg"=>"Hello Tyler!","to"=>"+15556667778","from"=>"+17776665555"],
["msg"=>"Hello Karla!","to"=>"+15556667779","from"=>"+17776665555"],
];
$response = Sms::sendArray($items);
//If you updated your aliases array in "config/app.php"
use Sms;
//or if you didnt...
use LeadThread\Sms\Facades\Sms;
$areacode = '435';
//Search for a number to buy
//The response is different for each SMS service provider. This example shows Plivo.
$response = Sms::searchNumber($areacode);
$number = $response['response']['objects'][0]['number'];
//Buy the number
Sms::buyNumber($number);
//Unrent the number
Sms::sellNumber($number);
bash
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.