grambas / sms-gateway
API container for Laravel 5.2
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/grambas/sms-gateway
Requires
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2025-10-13 08:08:09 UTC
README
Basic https://gatewayapi.com/ API Container for Laravel 5.*
Requirements
- "guzzlehttp/guzzle": "~6.0"
Install
Via Composer
$ composer require grambas/SmsGateway dev-master
Usage
Simple example to send sms
$client = new SmsGateway( 'API KEY','SECRET KEY'); // init client with api key and secret
$response = $client->send('SENDER NAME', '048139381038', 'Message content'); //send sms with paramters: sender name, phone nunbmer and message
if ( isset($response['ids']) ) { // if message is sent, then the system generates id. So if id exist, then the message is successfuly snent
return "Message successfuly sent! Cost: " . $response['usage']['total_cost'] . ' ' . $response['usage']['currency'];
}else{
return 'Error acquired during sending message';
}
Check balance
$client = new SmsGateway( 'API KEY','SECRET KEY');
$check = $client->me();
return 'New balance: ' . $check['credit'] . ' ' . $check['currency'];
License
The MIT License (MIT). Please see License File for more information.