dev-master
9999999-dev http://4jawaly.netLaravel package to send SMS using 4jawaly.net API
The Requires
- ext-curl *
- guzzlehttp/guzzle dev-master
by Marwan Zakariya
gateway sms 4jawaly
Laravel package to send SMS using 4jawaly.net API
Begin by installing this package through Composer. Run this command from the Terminal:, (*1)
composer require jawaly/smsgateway
Open config/app.php, and add a new item to the providers array., (*2)
Jawaly\SmsGateway\SmsServiceProvider::class
Add new item to aliases array:, (*3)
'Jawaly' => Jawaly\SmsGateway\Facades\Jawaly::class
This will allow you to use Jawaly facade :, (*4)
use Jawaly;
..., (*5)
Jawaly::send($message);
Now you can copy config file and migration file to your project using this line in terminal:, (*6)
php artisan vendor:publish
This will copy jawaly.php config file and sms log database migration If you faced any problem publishing these files just copy src/config/jawaly.php to your project config file, and src/database/migrations/* files to your project database migrations folder., (*7)
You have to change username and password in config file "you can put them in .env file as defined". It's better to use unicode encoding so let it to be true to use unicode to better Arabic message encoding., (*8)
You can set default sender here., (*9)
You can use file or database to store your message log, if you use database you have to migrate your database after publish package files., (*10)
You can use the facade directly., (*11)
Jawaly::send($message);
You can set numbers in two ways:, (*12)
Jawaly::send($message, $numbers);
or:, (*13)
Jawaly::setTo($numbers)->send($message);
You can set sender name in two ways:, (*14)
Jawaly::send($message, $numbers, $sender);
Or:, (*15)
Jawaly::setFrom($sender)->send($message);
This method doesn't take any parameters, you can use it simply:, (*16)
Jawaly::getCredits();
This will return an array with credits in second element if first element true, or response message in second element if first element false., (*17)
If you use database for log container in jawaly.php config file, this will store log in sms_log table every time you send message. If you use file for log container, this will store send log in storage/logs/jawaly.log, (*18)
Laravel package to send SMS using 4jawaly.net API
gateway sms 4jawaly