Georgian SMS providers service integration for Laravel 5.* ๐ Trying to make it perfect, easy to use and awesome package ๐ Pull requests are welcome.
Run composer command in your terminal.
composer require zgabievi/sms
If you are using Laravel 5.5, than installation is done. Otherwise follow next steps.
Open config/app.php
, find the providers
and add SMSServiceProvider
to the array.
'providers' => [
// ...
Gabievi\SMS\SMSServiceProvider::class,
],
Find the aliases
and add Facade
to the array.
'aliases' => [
// ...
'SMS' => Gabievi\SMS\Facades\SMS::class,
],
Method | MAGTI | SMSOFFICE | SMSCO |
---|---|---|---|
SMS::send($numbers, $message, $params = []) | + | + | + |
SMS::schedule($numbers, $message, $datetime) | - | - | + |
SMS::status($msg_id) | + | - | + |
SMS::balance() | - | + | - |
$numbers
- comma separated numbers or number, with format: 9955XXXXXXXX$message
- Text message which will be sent to the numbers.$params
- Array of key => values that will be used as http query. (Use this only if you know what you are doing)$datetime
- Datetime in formatY-m-d H:i:s
.$msg_id
- Message ID, which you will get from provider, to check status in future.
Symbol | Description |
---|---|
a-z | Characters in the range between a and z (case sensitive) |
A-Z | Characters in the range between A and Z (case sensitive) |
0-9 | Character in the range between 0 and 9 |
. | Point |
_ | Undercsore |
- | Dash |
" | Double Quotes |
' | Single Quote |
Space |
Publish SMS config file using command:
php artisan vendor:publish
This will create file config\sms.php
:
You can specify any allowed sms service provider from list below:
Allowed providers are: 'magti', 'smsoffice', 'smsco'
'default' => env('SMS_GATEWAY', 'margti'),
Here you must specify credentials required from provider
This credentials will be used in protocol
'providers' => [
'smsoffice' => [
'key' => env('SMS_PASSWORD', 'SECRET_KEY'),
'brand' => env('SMS_USERNAME', 'BRAND_NAME'),
],
'smsco' => [
'username' => env('SMS_USERNAME', 'USERNAME'),
'password' => env('SMS_PASSWORD', 'PASSWORD'),
],
'magti' => [
'username' => env('SMS_USERNAME', 'USERNAME'),
'password' => env('SMS_PASSWORD', 'PASSWORD'),
'client_id' => env('SMS_CLIENT_ID', 'CLIENT_ID'),
'service_id' => env('SMS_SERVICE_ID', 'SERVICE_ID'),
],
],
You can configure provider credentials in your config or .env
file
KEY | MAGTI | SMSOFFICE | SMSCO |
---|---|---|---|
SMS_GATEWAY | + | + | + |
SMS_USERNAME | + | BRAND | + |
SMS_PASSWORD | + | KEY | + |
SMS_CLIENT_ID | + | - | - |
SMS_SERVICE_ID | + | - | - |
laravel-georgian-sms is licensed under a MIT License.