PHP code example of bajjour / ensany-whatsapp

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

    

bajjour / ensany-whatsapp example snippets


$mobile = '970xxxxxxxxx';
$msg = 'Welcome From Ensany';
$res = $this->m_service->send_text($mobile, $msg);
bash
php artisan vendor:publish --provider="EnsanyWhatsapp\EnsanyWhatsappServiceProvider" --tag="ensany-whatsapp-config"
bash
use EnsanyWhatsapp\Services\WhatsappService;


public function __construct(WhatsappService $w_service)
{
    $this->w_service = $w_service;
}