1. Go to this page and download the library: Download ringlesoft/jasmin-client 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/ */
ringlesoft / jasmin-client example snippets
$sms = JasminClient::message()
->content('Hello there! Have a nice day')
->to("255711000000")
->from('INFO')
->via('rest') // 'rest' or 'http'
->send();
$message = JasminClient::message(to: "255711000000", content: "Hello There. Have a nice day");
$message2 = JasminClient::message(to: "255711000002", content: "Hello There. Have a nice day");
$batch = JasminClient::batch()
->addMessage($message)
->addMessage($message2)
->from("INFO")
->send();
Class DlrController extends Controller
{
public function handleDlr(Request $request)
{
return JasminClient::receiveDlrCallback($request, function(DeliveryCallback $dlr) {
// do something with the dlr and return true for success or false for failure
// For example, you can dispatch a job to process the Delivery Report
return true;
});
}
}
Class DlrController extends Controller
{
public function handleDlr(Request $request)
{
return JasminClient::receiveDlrCallback($request, function(DeliveryCallback $dlr) {
// do something with the dlr and return true for success or false for failure
// For example, you can dispatch a job to process Batch Callback
return true;
});
}
}