Download the PHP package sguy/easysms without Composer
On this page you can find all versions of the php package sguy/easysms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package easysms
Description
EasySms is a laravel package ( a wrapper for https://smsonlinegh.com sms gateway) which makes it very easy to send sms in your laravel applications with little setup.
This package also comes with a notification channel that integrates very well with laravel's powerful notification system.
You may however note that smsonlinegh works only in Ghana!.
This package is available via composer, follow the steps below to complete installation.
- Run composer require sguy/easysms
- Add Sguy\EasySms\EasySmsServiceProvider::class, to the providers array in app.php config file
- Publish Config File by Running the following command php artisan vendor:publish --tag=easysms
- Run composer dump-autoload
Usage
This package allows you to send sms,schedule sms, check sms balance, check the charge per sms before sending and finally using it as a channel for your notifications
Step One
To begin using this package, you need to create an account on https://smsonlinegh.com for free.
You may want to buy some credits on your account to send sms (credits are very affordable).
After creating your account and buying some sms credits, navigate to the easysms.php config file and update accordingly.
# easysms.php Config File
The config file has just three keys ..
- account_login : add the username or email of the account you created on smsonlinegh as value for this key.
- account_password : add the password for the account you created on smsonlinegh as value for this key.
- sender_id : this is basically whom you want to send the message as, it should not be more than 11 chars else value will be trimed and firt 11 used
eg. sender id can be an organization name, Yara Ghana or a phone number, 0543920099 .
Step 2
# Sending simple message
# Scheduling sms
# Sending Message to multiple recipients
# Checking balance and charge per sms
# Notification Channel
Create a TestNotification
Use it like so
Step One
To begin using this package, you need to create an account on https://smsonlinegh.com for free. You may want to buy some credits on your account to send sms (credits are very affordable). After creating your account and buying some sms credits, navigate to the easysms.php config file and update accordingly. # easysms.php Config File The config file has just three keys ..- account_login : add the username or email of the account you created on smsonlinegh as value for this key.
- account_password : add the password for the account you created on smsonlinegh as value for this key.
- sender_id : this is basically whom you want to send the message as, it should not be more than 11 chars else value will be trimed and firt 11 used eg. sender id can be an organization name, Yara Ghana or a phone number, 0543920099 .
Step 2
# Sending simple message
# Scheduling sms
# Sending Message to multiple recipients
# Checking balance and charge per sms
# Notification Channel
Create a TestNotification
Use it like so
Create a TestNotification
Use it like so
Please make sure your nofitiable entity uses the notifiable trait like so
# TestingIf you write unit tests for your functions, kindly Inject EasySms in your functions as opposed to instantiating it (You would realize EasySms was injected in all the example funtions). The reason is simply to allow you mock EasySms in your test cases.