PHP code example of misaf / laravel-sms-gateway-magfa

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

    

misaf / laravel-sms-gateway-magfa example snippets


use Misaf\LaravelSmsGateway\Facades\SmsGateway;

$response = SmsGateway::driver()->send([
    'senders' => ['3000'],
    'recipients' => ['09123456789'],
    'messages' => ['Hello from Magfa'],
]);

SmsGateway::driver('magfa')->send($data);                     // regardless of the default
SmsGateway::driver('magfa')->request()->get('some/endpoint'); // any other endpoint