hossammonir/fourjawaly

FourJawaly SMS

v1.0.0 2023-03-19 19:17 UTC

This package is not auto-updated.

Last update: 2025-01-21 02:07:35 UTC


README

Features

Send SMS.
Inquiry for Packages & Balance.

Installation

Add this line to your application's Gemfile:

composer require hossammonir/fourjawaly

Publish repository configuration file:

php artisan vendor:publish --provider="HossamMonir\FourJawaly\FourJawalyServiceProvider"

Prepare Environment

Add the following configuration to .env file .

FOURJAWALY_APP_ID="your app id"
FOURJAWALY_APP_SECRET="your app secret"
FOURJAWALY_DEFAULT_SENDER_ID="Demo"

Usage

Send SMS

use HossamMonir\FourJawaly\FourJawaly;

FourJawaly::setMessage('SMS Message Body')
        ->setNumbers(['966xxxxxxxxx', '966xxxxxxxxx'])
        ->setSenderId('Demo')
        ->send();

Inquiries

use HossamMonir\FourJawaly\FourJawaly;

FourJawaly::setOnlyActive(1)
        ->balance();

Setters

setOnlyActive = 1 - This will return only active packages.
setOnlyActive = 0 - This will return all packages.