Download the PHP package orkhanahmadov/laravel-az-sms-sender without Composer
On this page you can find all versions of the php package orkhanahmadov/laravel-az-sms-sender. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orkhanahmadov/laravel-az-sms-sender
More information about orkhanahmadov/laravel-az-sms-sender
Files in orkhanahmadov/laravel-az-sms-sender
Package laravel-az-sms-sender
Short Description Laravel 5 SMS Sender for Azerbaijani SMS providers
License MIT
Homepage https://github.com/orkhanahmadov/laravel-az-sms-sender
Informations about the package laravel-az-sms-sender
Laravel SMS Sender for Azerbaijani SMS providers
SMS sender currently supports 2 providers:
- Mobis (mobis.az)
- MSM (msm.az)
Installation
Run Composer command:
Add this line to your provider list (app/config.app
):
Add this line to your aliases list (app/config.app
):
Lastly you need to add following lines to your .env
file and fill their values:
- SMS_API_PROVIDER - SMS provider name,
msm
ormobis
- SMS_API_USER - Username given by provider
- SMS_API_PASSWORD - Password given by provider
- SMS_API_SENDER_NAME - Sender name given by provider
- SMS_API_USE_DB - Defines if all sent sms messages should be saved in DB table or not,
true
orfalse
If SMS_API_USE_DB
is set to true
the you need to migrate required tables to your database with artisan command:
Usage
To send SMS message anywhere in your app you can call:
- $number - recipient's phone number
- $message - SMS message
To send bulk message to multiple numbers you need to give array of numbers to $number argument, like:
To send individual messages to different numbers you need to give array of numbers and messages to $number where key is number and value is message. Method will ignore $message argument so it can be skipped.
Config
You can dump config files to your root config
directory with artisan command:
This command will create az-sms-sender
folder inside your root config
directory and dump all config files.
License
MIT
Todo
- Report method to check sent SMS statuses (automatic status check maybe?)
- Balance method to check current balance
- Better exception handling