1. Go to this page and download the library: Download combindma/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/ */
combindma / laravel-twilio example snippets
return [
/*
|--------------------------------------------------------------------------
| SID
|--------------------------------------------------------------------------
|
| Your Twilio Account SID #
|
*/
'sid' => env('TWILIO_SID', ''),
/*
|--------------------------------------------------------------------------
| Access Token
|--------------------------------------------------------------------------
|
| Access token that can be found in your Twilio dashboard
|
*/
'token' => env('TWILIO_AUTH_TOKEN', ''),
/*
|--------------------------------------------------------------------------
| From Number
|--------------------------------------------------------------------------
|
| The Phone number registered with Twilio that your SMS & Calls will come from
|
*/
'from' => env('TWILIO_NUMBER', ''),
/*
|--------------------------------------------------------------------------
| Enable
|--------------------------------------------------------------------------
|
| Enable or disable script rendering. Useful for local development.
|
*/
'enabled' => env('TWILIO_ENABLED', true),
];
use Combindma\Twilio\Facades\Twilio;
Twilio::message($phone, $message);