devhereco / 4jawaly
A Laravel package for 4 Jawaly SMS API.
1.0.0
2023-06-10 21:40 UTC
Requires
- guzzlehttp/guzzle: ^7.4
README
4 Jawaly SMS is a Laravel package that provides a method to use forjawaly API services, with a few simple lines of code.
Installation
1. Require with Composer
- composer require guzzle/guzzle - composer require devhereco/forjawaly
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\ForJawaly\ServiceProvider::class,
3. env variables
FOR_JAWALY_APP_KEY= FOR_JAWALY_SECRET= FOR_JAWALY_SENDER=
Usages
1. One way messages
This function will allow you to send messages to selected numbers.
Examples:
use Devhereco\ForJawaly\ForJawaly; ForJawaly::send('966555644047', 'Test Message'); // ForJawaly::send(Receiver Number, Message);
2. Get Account Balance
This function will show ForJawaly account balance in your backend.
Examples:
use Devhereco\ForJawaly\ForJawaly; ForJawaly::balance();