PHP code example of danbka33 / smstraffic-api-laravel

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

    

danbka33 / smstraffic-api-laravel example snippets


  \Danbka33\SmsTrafficApi\Providers\SmsTrafficServiceProvider::class,
  

$app->configure('sms-traffic');

$app->register(\Danbka33\SmsTrafficApi\Providers\SmsTrafficServiceProvider::class);

use Danbka33\SmsTrafficApi\Client;
use Danbka33\SmsTrafficApi\Sms\Sms;

$client = app()->get(Client::class);
$result = $client->send(new Sms($phone, $message));

return [
    'login' => env('SMS_TRAFFIC_LOGIN', ''),
    'password' => env('SMS_TRAFFIC_PASSWORD', ''),
    'originator' => env('SMS_TRAFFIC_ORIGINATOR', ''),
];
bash
php artisan vendor:publish --tag=sms-traffic-config