1. Go to this page and download the library: Download groupesti/laravel-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/ */
groupesti / laravel-twilio example snippets
use Twilio\Actions\SendTwilioMessageAction;
use Twilio\DTOs\SendMessageData;
$message = app(SendTwilioMessageAction::class)->handle(
new SendMessageData(to: '+15145550100', body: 'Bonjour.'),
);
use Twilio\Actions\StartTwilioVoiceCallAction;
use Twilio\DTOs\VoiceCallData;
$call = app(StartTwilioVoiceCallAction::class)->handle(
new VoiceCallData(to: '+15145550100', message: 'Votre rendez-vous est confirmé.'),
);
use Twilio\Interfaces\TwilioClientInterface;
$this->app->instance(TwilioClientInterface::class, $fake);