Download .zip |
Info | Documentation | View files (14) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2017-09-11 (23 hours ago) | Not yet rated by the users | Total: 6 This week: 6 | All time: 9,008 This week: 108 |
Version | License | PHP version | Categories | |||
laravel-etextmail 1.0 | BSD License | 5 | PHP 5, Wireless and Mobile, Web services |
Description | Author | ||||||||
This package can send SMS messages via etextmail.com API. |
|
Laravel-etextmail is built on etextmail api (http://etextmail.com) which is an SMS gateway to send sms messages to cell phones on GSM and CDMA networks, Glo, MTN, Zain, Etisalat, Starcomms, Visafone in Nigeria and Globally.
To get the latest version of laravel-etextmail, simply
composer require ibonly\laravel-etextmail
Or include
"ibonly/laravel-etextmail: 1.0.*"
to your composer.json file and run composer update
or composer install
Once Laravel EtextMail is installed, you need to register the service provider. Open up config/app.php
and add the following to the providers
key.
Ibonly\EtextMail\EtextMailServiceProvider::class,
Also, register the Facade like so:
'aliases' => [
...
'EtextMail' => Ibonly\EtextMail\Facades\EtextMail::class,
...
]
Publish configuration file using the command bellow:
php artisan vendor:publish --provider="Ibonly\EtextMail\EtextMailServiceProvider"
A file etextmail.php
containing default configuration settings will be added to config/
directory.
return [
'senderid' => getenv('ETEXTMAIL_SENDER'),
'username' => getenv('ETEXTMAIL_EMAIL'),
'password' => getenv('EXTEXTMAIL_PASSWORD'),
'url' => getenv('ETEXTMAIL_URL'),
];
Open your .env file and add your SMS Sender Id
, etextmail email
, etextmail password
and etextmail url
:
ETEXTMAIL_SENDER=xxxxx
ETEXTMAIL_EMAIL=xxxxx
EXTEXTMAIL_PASSWORD=xxxxx
ETEXTMAIL_URL=http://mail.etextmail.com
Note that resellers are to use their own url.
use EtextMail;
class SMS
{
/
* @return float
*/
public function getSMSBalance()
{
dd(EtextMail::getCreditBalance())
}
/
* @param $message [the message to be processed]
* @return int
*/
public function messageCount($message)
{
dd(EtextMail::getMessageCount($message));
}
/
* @param $message [the message to be processed]
* @return int
*/
public function characterCount($message)
{
dd(EtextMail::getCharacterCount($message));
}
/
* @param $destination [reciever's mobile number]
* @param message [the message to be processed]
* @return boolean
*/
public function sendSMS($destination, $message)
{
dd(EtextMail::sendMessage($destination, $message));
}
/
* @param $destination [reciever's mobile number]
* @param $message [the message to be processed]
* @param $longSMS [number of pages]
* @return boolean
*/
public function sendLongSMS($destination, $message, $longSMS)
{
dd(EtextMail::sendMessage($destination, $message, $longSMS))
}
}
$ vendor/bin/phpunit test
To contribute and extend the scope of this package, Please check out CONTRIBUTING file for detailed contribution guidelines. Feel free to raise any issue or concern.
Laravel-etextmail is created and maintained by Ibraheem ADENIYI
.
Files |
File | Role | Description | ||
---|---|---|---|---|
resources (1 directory) | ||||
src (2 files, 3 directories) | ||||
tests (1 file) | ||||
.scrutinizer.yml | Data | Auxiliary data | ||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
CONTRIBUTING.md | Data | Auxiliary data | ||
phpunit.xml.dist | Data | Auxiliary data | ||
Readme.md | Doc. | Documentation |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
Exceptions (1 file) | ||||
Facade (1 file) | ||||
Helpers (1 file) | ||||
EtextMail.php | Class | Class source | ||
EtextMailServiceProvider.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.