PHP code example of ahmedrafat / magic-sms

1. Go to this page and download the library: Download ahmedrafat/magic-sms 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/ */

    

ahmedrafat / magic-sms example snippets

bash
php artisan vendor:publish --provider="AR\\MagicSms\\Providers\\MagicSmsServiceProvider"
 php
//using MagicSMS
use AR\MagicSms\MagicSms;

$sms = (new MagicSms)->send($destination, $message);
// You can check if send success via $sms->successful()
// Or can check if send failed via $sms->failed()
// or get the server response via $sms->getResponse()
 php
$sendSms = magicSendSms($destination, $message); //returns true/false