PHP code example of medianova / laravel-sms

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

    

medianova / laravel-sms example snippets


return [
    'default_provider'=>env('SMS_PROVIDER', 'oztek'),
    'fallback_provider'=>env('SMS_PROVIDER_FALLBACK', ''), //alternative sms provider for an emergency
    'oztek'=>[
        'url'=>env('OZTEK_URL', 'http://www.ozteksms.com/panel/smsgonder1Npost.php'),
        'type'=>env('OZTEK_TYPE', 'Normal'),
        'number'=>env('OZTEK_NUMBER', 'XXXXXXXXX.XXXXXXXXX.XXXXXXXXX'),
        'username'=>env('OZTEK_USERNAME', 'XXXXXXX'),
        'password'=>env('OZTEK_PASSWORD', 'XXXXXXX'),
        'orginator'=>env('OZTEK_ORGINATOR', 'XXXXXXX'),
    ],
];



use Medianova\LaravelSms\Facades\Sms;

Sms::to('0905551234567')
    ->send('Hello World');

Sms::provider('oztek')
    ->to('0905551234567')
    ->send('Hello World');