PHP code example of sawirricardo / laravel-whatsapp

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

    

sawirricardo / laravel-whatsapp example snippets


return [
    'token' => env('WHATSAPP_TOKEN'),

    'phone_id' => env('WHATSAPP_PHONE_ID'),

    'webhook_verify_token' => env('WHATSAPP_WEBHOOK_VERIFY_TOKEN', 'default'),
];

\Sawirricardo\Whatsapp\Laravel\Facades\Whatsapp::create()
    ->to('+10252423232')
    ->message(new TextMessageData('Hello world!'))
    ->send();
bash
php artisan vendor:publish --tag="whatsapp-config"