PHP code example of carropublic / laraveltwilio
1. Go to this page and download the library: Download carropublic/laraveltwilio 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/ */
carropublic / laraveltwilio example snippets
bash
php artisan vendor:publish --tag=laraveltwilio.config
class Contact extends Model {
use Notifiable;
// Phone number to receive
public function routeNotificationForSms()
{
return $this->phone;
}
// Phone number to receive
public function routeNotificationForWhatsapp()
{
return $this->phone;
}
}
LaravelTwilioManager::registerSandboxValidator(function () {
return !is_production();
});
LaravelTwilioSender::registerValidPhoneForSandbox(function ($phoneNumber) {
return $phoneNumber == "+84111111111";
}