Seamlessly interact with Jasmin SMS Gateway from your Laravel application.
A powerful Laravel package designed to seamlessly interact with the Jasmin SMS Gateway, enabling developers to send and receive SMS messages effortlessly. Built on the robust features of the Jasmin SMS Gateway, this package supports both HTTP and SMPP protocols, allowing for flexible message routing and delivery.
Experience the convenience of SMS messaging with Jasmin Client, tailored specifically for Laravel developers.
Supports both HTTP and SMPP protocols for flexible message routing and delivery.
Seamlessly integrates with your existing Laravel application with minimal configuration.
Full support for sending and receiving SMS messages through Jasmin Gateway.
Works with Laravel's notification system for easy SMS notifications.
Track message delivery status with built-in delivery report handling.
Jasmin Client is designed to make SMS integration simple. Install the package, configure your Jasmin Gateway credentials, and start sending messages in minutes.
Send SMS notifications for order updates, appointment reminders, and alerts.
Implement SMS-based 2FA for enhanced security in your applications.
Send bulk SMS messages for marketing and promotional campaigns.
Install the package today and start sending SMS messages from your Laravel app.
A Laravel package for seamless integration with Jasmin SMS Gateway, supporting HTTP, REST API, and SMPP connections.
You can install the package via composer:
composer require ringlesoft/jasmin-client
php artisan vendor:publish --provider="RingleSoft\JasminClient\JasminClientServiceProvider"
Then, edit the config/jasmin_client.php file with your Jasmin SMS Gateway credentials and preferred settings.
The following are available configurations. Most of these are just defaults and can be overridden in your code
url : The base url of the jasmin server (include the port if different from 80 or 443/446)username : The username for your jasmin accountpassword : The password for your jasmin accountdlr_callback_url : The default sms delivery callback urlbatch_callback_url : the default batch callback urlbatch_errback_url : the default batch errback urldefault_dlr_method : the default dlr method (GET/POST)default_dlr_level : The default DLR level (1, 2, or 3)batch_chunk_size : The default Chunk size for batches$sms = JasminClient::message()
->content('Hello there! Have a nice day')
->to("255711000000")
->from('INFO')
->via('rest') // 'rest' or 'http'
->send();
RingleSoft\JasminClient\Models\Jasmin\SentMessage $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();
RingleSoft\JasminClient\Models\Jasmin\SentBatchThis package provides a streamlined way to handle delivery statuses.
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;
});
}
}
When messages are sent in a batch, Jasmin responds with the ID of the batch created (batchId) and enqueue the messages.
When each message is sent to SMC, jasmin fires a callback (batch callback) with messageId of each message within the
batch.
To handle batch callbacks, you can use the receiveBatchCallback method.
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;
});
}
}
$route = JasminClient::rest()->checkRoute("255711000000");
$balance = JasminClient::rest()->checkBalance();
$metrics = JasminClient::http()->getMetrics();
I'll soon let you know when you can contribute to this project.
This package is open-sourced software licensed under the MIT license.
Follow me on X: @ringunger
Email me: [email protected]
Website: https://ringlesoft.com
Note: This package is still under development. Please report any issues you encounter.