PHP code example of tomatophp / filament-twilio

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

    

tomatophp / filament-twilio example snippets


use TomatoPHP\FilamentTwilio\Traits\InteractsWithTwilioWhatsapp;

class User extends Authenticatable
{
    use InteractsWithTwilioWhatsapp;
}


\Filament\Notifications\Notification::make()
    ->body('Your Message You Like To Send Here!')
    ->sendToTwilioWhatsapp(
        user: $user,
        mediaURL: "https://images.unsplash.com/photo-1545093149-618ce3bcf49d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=668&q=80"
    );

$user->notifyTwilioWhatsapp(
    message: 'Your Message You Like To Send Here!',
    mediaURL: "https://images.unsplash.com/photo-1545093149-618ce3bcf49d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=668&q=80"
);
bash
php artisan config:cache
bash
php artisan vendor:publish --tag="filament-twilio-config"