PHP code example of andriwil0176 / laravel-watzap

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

    

andriwil0176 / laravel-watzap example snippets


use Watzap;

Watzap::sendText('6281234567890', 'Hello world!');

use Andriwil0176\Watzap\WatzapClient;

class DemoController extends Controller
{
    public function send(WatzapClient $watzap)
    {
        return $watzap->sendImage('6281234567890', 'https://example.com/image.jpg', 'Check this out!');
    }
}
bash
php artisan vendor:publish --tag=watzap-config
bash
php artisan watzap:send 6281234567890 "Test message"

POST /watzap/webhook