1. Go to this page and download the library: Download rahulhaque/adn-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/ */
php
use RahulHaque\AdnSms\Facades\AdnSms;
class SomeController
{
/**
* Make request and return response
*
* @return \Illuminate\Http\Client\Response
* @throws \Throwable
*/
public function someFunction()
{
$response = AdnSms::to('01XXXXXXXXX')
->message('Send SMS Test.')
->send();
return $response->json();
}
}
php
use RahulHaque\AdnSms\Facades\AdnSms;
class SomeController
{
/**
* Make request and return response
*
* @return \Illuminate\Http\Client\Response
* @throws \Throwable
*/
public function someFunction()
{
$response = AdnSms::otp('01XXXXXXXXX')
->message('Send OTP SMS Test.')
->send();
return $response->json();
}
}
php
use RahulHaque\AdnSms\Facades\AdnSms;
class SomeController
{
/**
* Make request and return response
*
* @return \Illuminate\Http\Client\Response
* @throws \Throwable
*/
public function someFunction()
{
$response = AdnSms::bulk(['01XXXXXXXXX', '02XXXXXXXXX'])
->campaignTitle('Bulk SMS Test')
->message('Send Bulk SMS Test.')
->send();
return $response->json();
}
}
php
use RahulHaque\AdnSms\Facades\AdnSms;
use Illuminate\Http\Client\Response;
use App\Models\Table;
class SomeController
{
public function someFunction()
{
AdnSms::bulk(['01XXXXXXXXX', '02XXXXXXXXX'])
->campaignTitle('Bulk SMS Test')
->message('Send Bulk SMS Test.')
->queue(function (Response $response) {
// Check if the response body is empty
if ($response->body() != "") {
// Store the $response in the database
$model = new Table();
$model->data = $response->body();
$model->save();
}
});
}
}
php
use RahulHaque\AdnSms\Facades\AdnSms;
class SomeController
{
/**
* Make request and return response
*
* @return \Illuminate\Http\Client\Response
* @throws \Throwable
*/
public function someFunction()
{
$response = AdnSms::checkBalance();
return $response->json();
}
}
php
use RahulHaque\AdnSms\Facades\AdnSms;
class SomeController
{
/**
* Make request and return response
*
* @return \Illuminate\Http\Client\Response
* @throws \Throwable
*/
public function someFunction()
{
$response = AdnSms::checkSmsStatus('SXXXXXXXXXXXXXXXX');
return $response->json();
}
}
php
use RahulHaque\AdnSms\Facades\AdnSms;
class SomeController
{
/**
* Make request and return response
*
* @return \Illuminate\Http\Client\Response
* @throws \Throwable
*/
public function someFunction()
{
$response = AdnSms::checkCampaignStatus('CXXXXXXXXXXXXXXXX');
return $response->json();
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.