PHP code example of axelhub / twilio

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

    

axelhub / twilio example snippets


$twilio = new Twilio();
$twilio->sendSms($PhoneNumber, $Message);

use Axel\Twilio\SmsChannel;

public function via($notifiable)
{
    return [SmsChannel::class];
}

use Axel\Twilio\SmsMessage;

public function toSms($notifiable): SmsMessage
{
    return (new SmsMessage)
        ->to($PhoneNumber)
        ->message($Message);
}