PHP code example of vikki-user / turbosms

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

    

vikki-user / turbosms example snippets


// config/services.php
...
'turbosms' => [
    'login'  => env('TURBOSMS_LOGIN'),
    'password' => env('TURBOSMS_PASSWORD'),
    'sender' => env('TURBOSMS_SENDER'), // optional
],
...

use Illuminate\Notifications\Notification;
use NotificationChannels\TurboSms\{
    TurboSmsMessage, TurboSmsChannel
};

class AccountApproved extends Notification
{
    public function via( $notifiable ) : array
    {
        return [ TurboSmsChannel::class ];
    }

    public function toTurboSms( $notifiable ) : TurboSmsMessage
    {
        return ( new TurboSmsMessage() )
            ->content( 'Your {$notifiable->service} account was approved!' )
            ->sender( 'Sender' )
            ;
    }
}

public function routeNotificationForTurboSms()
{
    return $this->phone;
}