1. Go to this page and download the library: Download sevenspan/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/ */
sevenspan / laravel-whatsapp example snippets
return [
/*
|--------------------------------------------------------------------------
| Whatsapp API URI
|--------------------------------------------------------------------------
|
| The Whatsapp Message API URI.
|
*/
'api_uri' => env('WHATSAPP_API_URI', 'https://graph.facebook.com/v14.0/'),
/*
|--------------------------------------------------------------------------
| WHATSAPP BUSINESS ACCOUNT ID
|--------------------------------------------------------------------------
|
| The Whatsapp business account id (waba_id).
|
*/
'whatsapp_business_account_id' => env('WHATSAPP_BUSINESS_ACCOUNT_ID', ''),
/*
|--------------------------------------------------------------------------
| ACCESS TOKEN
|--------------------------------------------------------------------------
|
| The Whatsapp business account user access token.
|
*/
'access_token' => env('ACCESS_TOKEN', ''),
/*
|--------------------------------------------------------------------------
| SEPARATOR
|--------------------------------------------------------------------------
|
| The Whatsapp separator is used for the separat your string message.
| For example: $message = 'Hello,123'; then set your .env file variable (SEPARATO=,).
*/
'separator' => env('SEPARATOR', '~'),
/*
|--------------------------------------------------------------------------
| FROM PHONE NUMBER ID
|--------------------------------------------------------------------------
|
| The Whatsapp register phome number Id.
| You have to get from phone number id using getPhoneNumbers() function.
*/
'from_phone_number_id' => env('FROM_PHONE_NUMBER_ID', ''),
];