1. Go to this page and download the library: Download moeen-basra/send-pk 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/ */
moeen-basra / send-pk example snippets
use MoeenBasra\SendPk\SmsMessage
class MyClass {
public function sendMessage(): void
{
$response = (new SmsMessage())
->fields('template_id', confg('send-pk.templates.{my_template_id}'))
->fields('message', [
// template parameters
]);
if ($response->code === 200) {
// handle success
} else {
// handle failed
}
}
}