From 151c4bc64ae239cbd6caa81e437c0e4df45bff3e Mon Sep 17 00:00:00 2001 From: Musafa Mughal Date: Wed, 15 May 2019 15:50:14 +0500 Subject: [PATCH] README.MD - Laravel Framework instructions Laravel Framework usage instructions has been added. --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 15e46bf..4189856 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,47 @@ Begin by pulling in the package through Composer. composer require developifynet/telenor-php ``` -## Usage +## Laravel Framework Usage + +Within your controllers, you can call Telenor facade and can send quick SMS. + +##### For Single Number +```php +use Developifynet\Telenor\Telenor; +public function index() +{ + $SMSObj = array( + 'username' => '', // Usually this is mobile number + 'password' => '', // User your password here + 'to' => '923XXXXXXXXX', // You can provide single number as string or an array of numbers + 'text' => '', // Message string you want to send to provided number(s) + 'mask' => '', // Use a registered mask with Telenor + 'test_mode' => '0', // 0 for Production, 1 for Mocking as Test + ); + + $response = Telenor::SendSMS($SMSObj); +} +``` + +##### For Multiple Numbers +```php +use Developifynet\Telenor\Telenor; +public function index() +{ + $SMSObj = array( + 'username' => '', // Usually this is mobile number + 'password' => '', // User your password here + 'to' => ['923XXXXXXXXX', '923XXXXXXXXX'], // You can provide single number as string or an array of numbers + 'text' => '', // Message string you want to send to provided number(s) + 'mask' => '', // Use a registered mask with Telenor + 'test_mode' => '0', // 0 for Production, 1 for Mocking as Test + ); + + $response = Telenor::SendSMS($SMSObj); +} +``` + +## Other Usage Within your controllers, you can call TelenorSMS Object and can send quick SMS.