1. Go to this page and download the library: Download vantomdev/smsmisr 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/ */
vantomdev / smsmisr example snippets
'Too many requests. Please try again after 5 minutes.'
'enable_rate_limit' => false,
return [
'rate_limited' => 'Too many requests. Please try again after 5 minutes.',
'success' => 'OTP sent successfully!',
];
use VantomDev\SmsMisr\Facades\SmsMisr;
use VantomDev\SmsMisr\Exceptions\SmsMisrException;
try {
$response = SmsMisr::sendSms('2011XXXXXXX', 'This is a test message.', 1); # 1 For English , 2 For Arabic , 3 For Unicode
return back()->with('success', __('smsmisr::messages.success'));
} catch (SmsMisrException $e) {
return back()->with('error', $e->getMessage());
}