Malath SMS is a Laravel package that provides a method to use malath API services, with a few simple lines of code.
1. Require with Composer
- composer require guzzle/guzzle
- composer require devhereco/malathsms
Latest Laravel versions have auto dicovery and automatically add service provider - if you're using 5.4.x and below, remember to add it to providers
array at /app/config/app.php
:
// ...
Devhereco\MalathSMS\ServiceProvider::class,
php artisan migrate
MALATH_SMS_USERNAME=
MALATH_SMS_PASSWORD=
MALATH_SMS_SENDER=
This function will allow you to send messages to selected numbers.
Examples:
use Devhereco\MalathSMS\MalathSMS;
MalathSMS::sendOneSide('966555644047', 'Test Message');
// MalathSMS::sendOneSide(Receiver Number, Message);
This function will show Malath account balance in your backend.
Examples:
use Devhereco\MalathSMS\MalathSMS;
MalathSMS::getBalance();