PHP code example of munafio / oursms-laravel

1. Go to this page and download the library: Download munafio/oursms-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

munafio / oursms-laravel example snippets


use Munafio\OurSMS\Facades\OurSMS;

...
public function example(Request $request){
	...
	OurSMS::sendOSM(...,...);
	...
}
...

OurSMS::sendOSM($phoneNumber, $message);

OurSMS::sendOTP($phoneNumber, $message);

OurSMS::getStatus($messageId);

/*
|-------------------------------------
| OurSMS service credentials
|-------------------------------------
*/
'user_id'  =>  env('OURSMS_USER_ID',  null),
'secret_key'  =>  env('OURSMS_SECRET_KEY',  null),

/*
|-------------------------------------
| OurSMS service API base_uri
|-------------------------------------
*/
'base_uri'  =>  'https://oursms.app/api/v1/SMS'

$ php artisan oursms:install