SMS libaray using hisms

dev-master 2018-03-13 08:00 UTC

This package is not auto-updated.

Last update: 2024-11-09 13:38:36 UTC


README

Sending sms using Hisms provider for Laravel 5

Introduction

Still Working on it, any feedbacks are appreciated.

Installation

First, you'll need to require the package with Composer:

composer require shreifelagamy/hisms:"dev-master"

Then, update config/app.php by adding an entry for the service provider

'providers' => [
	// ...
	Shreifelagamy\Hisms\HiSmsServiceProvider::class
];

Then, register class alias by adding an entry in aliases section

'aliases' => [
	// ...
  'Hisms' => Shreifelagamy\Hisms\HismsFacade::class
];

Finally create config file named hisms.php in config directory or you can use

php artisan vendor:publish --tag=config

Configuration

You need to fill in hisms.php file with the proper credentials

return array(
    /*
    |--------------------------------------------------------------------------
    | hisms App Credentials
    |--------------------------------------------------------------------------
    |
    |
    */
    'Username' => 'USERNAME',
    'Password' => 'PASSWORD',
    'SenderName' => 'SENDERNAME',
);

Usage

You can send to specific number or multiple numbers in once using this function, but always remember to include the country code with the number EX: 9665xxxxxx

Sending to specific number

\Hisms::sendSMS('message', '96653xxxxxxx');

Sending to multiple numbers

\Hisms::sendSMS('message', ['96653xxxxxxx', '96653xxxxxxx']);