Skip to content

Latest commit

 

History

History
63 lines (46 loc) · 1.9 KB

README.md

File metadata and controls

63 lines (46 loc) · 1.9 KB

Malath SMS

Malath SMS is a Laravel package that provides a method to use malath API services, with a few simple lines of code.

downloads stars contributors releases issues latest-release

Installation

1. Require with Composer

- composer require guzzle/guzzle
- composer require devhereco/malathsms

2. Add Service Provider (Laravel 5.4 and below)

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,

3. Migrations

php artisan migrate

4. env variables

MALATH_SMS_USERNAME=
MALATH_SMS_PASSWORD=
MALATH_SMS_SENDER=

Usages

1. One way messages

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);

2. Get Account Balance

This function will show Malath account balance in your backend.

Examples:

use Devhereco\MalathSMS\MalathSMS;

MalathSMS::getBalance();