PHP code example of sigfriedseldeslachts / twiliosms

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

    

sigfriedseldeslachts / twiliosms example snippets


// File: config/app.php

'providers' => [
    ...
    Sigfriedseldeslachts\twiliosms\TwilioSMSServiceProvider::class,
    ...
];

'aliases' => [
    ...
    'Twillio' => Sigfriedseldeslachts\twiliosms\Facades\Twilio::class,
    ...
];

Twilio::SMS(string $to, string $message);

Twilio::SMS(string $to, string $message, string $from);

Twilio::SMS('+123456789', 'Hello from Laravel!', '+987456321');

Twilio::MMS(string $to, string $message, string $url);

Twilio::MMS(string $to, string $message, string $url, string $from);

Twilio::MMS('+123456789', 'Hello from Laravel!', 'http://www.hookinfo.com/wp-content/uploads/2016/08/laravel-1.png', '+987456321');

Twilio::Call(string $to, string $url);

Twilio::Call(string $to, string $url, string $from);

Twilio::Call('+123456789', 'http://demo.twilio.com/docs/voice.xml', '+987456321');