PHP code example of campaigningbureau / whatsatool-client

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

    

campaigningbureau / whatsatool-client example snippets


'providers' => [
    ...
    CampaigningBureau\WhatsAToolClient\WhatsAToolClientProvider::class,
]

'aliases' => [
    ...
    'WhatsAToolClient' =>  CampaigningBureau\WhatsAToolClient\WhatsAToolClientFacade::class,
]

$phonenumber = '+43 664 123 456 87';
CampaigningBureau\WhatsAToolClient\Msisdn::validatePhonenumber($phonenumber);

$phonenumber = '+43 664 123 456 87';
$msisdn = new Msisdn($phonenumber);
try {
    $simMsisdn = WhatsATool::registerContact($msisdn, $channel, $sendSms);
} catch (WhatsAToolException $exception) {
    Log::error($exception->getMessage());
}

$ php artisan vendor:publish