package to send WhatsApp text messages
- Register in meta developers
- Follow the instructions to
- create app
- connect to whatsapp
- add phone number for testing
- Install the package via Composer:
composer require elngar/whatsapp
- Change configrations in config/whatsapp.php file:
"access_token" => '',
"phone_number_id" => ''
- To send text message to particular number:
Whatsapp::send('01*********', 'Hello msg');
- To get sent message response result:
- When sending
$response = Whatsapp::send('01*********', 'Hello msg');
- After sending message
$response = Whatsapp::getSendResult();