bajjour / ensany-whatsapp
A Laravel package for Send Whatsapp messages using ensany backend
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/bajjour/ensany-whatsapp
Requires
- php: ^8.0
- illuminate/cache: ^9.0|^10.0|^11.0|^12.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
README
This package provides a simple and easy-to-use interface to send whatsapp messages using Ensany Dashboard.
Installation
You can install the package via Composer:
composer require bajjour/ensany-whatsapp
Configuration
After installing the package, publish the configuration file:
php artisan vendor:publish --provider="EnsanyWhatsapp\EnsanyWhatsappServiceProvider" --tag="ensany-whatsapp-config"
Update your .env file with your Stripe API credentials:
ENSANY_WHATSAPP_API_KEY="your-app-key" ENSANY_WHATSAPP_DEVICE_ID="device-id"
Usage
Initialize the Service
You can initialize the Stripe service in your controller:
use EnsanyWhatsapp\Services\WhatsappService; public function __construct(WhatsappService $w_service) { $this->w_service = $w_service; }
Send Text Message
$mobile = '970xxxxxxxxx'; $msg = 'Welcome From Ensany'; $res = $this->m_service->send_text($mobile, $msg);
Response
detailed array returned
{
"status": true,
"message": "lynx.successfully",
"result": {
"success": true,
"message_id": "sent-message-id",
"scheduled_at": "send-date"
},
"meta": null
}