PHP code example of cuneytyuksel / toplusms

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

    

cuneytyuksel / toplusms example snippets


'providers' => [
	// ...
    Sms\TopluSms\TopluSmsProvider::class,
];

return [
   // ...
	,
        'toplusms' => [
            'username' => env('TOPLUSMS_USERNAME'),
            'password' => env('TOPLUSMS_PASSWORD'),
            'from' => env('TOPLUSMS_FROM', null), // Can be ovverdiden with $message->from() 
        ]
    // ...
];

    // ...
    public function routeNotificationForSms(){
        return $this->phone;
    }
    // ...

    // ...
    public function via($notifiable)
    {
        return ['sms'];
    }
    // ...

    // ...
    public function toSms($notifiable)
    {
        return "Hello World!";
    }
    // ...

     // ...
     public function toSms($notifiable)
     {
        $message = new SmsMessage("Hello World");
        $message->from("5xxxxxxxxx");
        return $message;
     }
     // ...