PHP code example of hopeofiran / avanak-laravel
1. Go to this page and download the library: Download hopeofiran/avanak-laravel 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/ */
hopeofiran / avanak-laravel example snippets
$credit = \hopeofiran\avanak\Facades\AvanakFacade::config('username', "{$your_username}")
->config('password', "{$your_password}")
->getCredit();
$credit = \hopeofiran\avanak\Facades\AvanakFacade::config(['username'=>"{$your_username}", 'password' => "{$your_password}"])
->getCredit();
$credit = \hopeofiran\avanak\Facades\AvanakFacade::baseUrl("$avanak_new_address")
->getCredit();
$title = 'example title';
$numbers = ['0912×××6789', '0911×××1111'];
$maxTryCount = 2;
$minuteBetweenTries = 1;
$start = now()->addMicros(5);
$end = now()->endOfDay();
$messageId = 123456789;
$campaign = \hopeofiran\avanak\Facades\AvanakFacade::createCampaign($title, $numbers, $maxTryCount, $minuteBetweenTries, $start, $end, $messageId);
$number = '0912×××6789';
$messageId = 123456789;
$response = \hopeofiran\avanak\Facades\AvanakFacade::quickSend($number, $messageId);
shell script
php artisan vendor:publish --provider=hopeofiran\avanak\Providers\AvanakProvider