Download the PHP package izzuddinmohsin/laravel-whatsapp without Composer
On this page you can find all versions of the php package izzuddinmohsin/laravel-whatsapp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download izzuddinmohsin/laravel-whatsapp
More information about izzuddinmohsin/laravel-whatsapp
Files in izzuddinmohsin/laravel-whatsapp
Package laravel-whatsapp
Short Description A Laravel connector for WhatsApp via Evolution API. Simple, clean, and framework-agnostic within Laravel ecosystem.
License MIT
Informations about the package laravel-whatsapp
Laravel WhatsApp Connector
A simple, clean Laravel package to connect with WhatsApp via Evolution API. Works with Blade, Livewire, Inertia.js — any Laravel stack.
Disclaimer: This package uses unofficial WhatsApp APIs via Evolution API. WhatsApp/Meta may ban numbers that use unofficial APIs. Use at your own risk and consider the official WhatsApp Cloud API for production business use.
Features
- Send messages: text, image, video, audio, document, location, contact, buttons, list
- Receive messages via webhooks with event-driven architecture
- Full instance management (create, delete, restart, connect, logout)
- Database storage for instances, messages, and webhook logs
- Queue support for async message sending and webhook processing
- Laravel Notifications channel integration
- Multi-instance support for multiple WhatsApp accounts
- Cleanup command for old data retention
- Reusable trait for any service class
- Configurable storage (can run lightweight without database)
- Retry logic on API calls
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- A running Evolution API instance
Installation
Publish the config:
Publish and run migrations (optional but recommended):
Add to your .env:
Note: If you don't need database storage, set
WHATSAPP_STORE_MESSAGES=falseandWHATSAPP_STORE_WEBHOOKS=falsein your.env. You can skip the migration publish step entirely.
Quick Start
Sending Messages
Interactive Messages
Instance Management
Basic Operations
Full Instance CRUD
Webhook Management
Additional API Methods
Multi-Instance Support
Receiving Messages (Webhooks)
The package automatically registers a webhook route at /whatsapp/webhook (configurable).
1. Point Evolution API to your webhook
In your Evolution API instance settings, set the webhook URL to:
Or set it programmatically:
2. Listen to events
Create a listener in your app:
3. Register the listener
Available Events
| Event | Description | Payload |
|---|---|---|
WhatsAppMessageReceived |
New message received | $message (IncomingMessage), $rawPayload |
WhatsAppMessageStatusUpdated |
Status changed (sent/delivered/read) | $messageId, $status, $from, $instanceName |
WhatsAppConnectionStatusChanged |
Instance connected/disconnected | $status, $instanceName, $rawPayload |
InstanceConnected |
Instance successfully connected | $instance (WhatsappInstance model) |
InstanceDisconnected |
Instance disconnected | $instance, $reason |
QrCodeUpdated |
New QR code generated | $instance, $qrCodeData |
Queue Support
Enable async message sending and webhook processing:
When enabled:
- Outgoing messages are dispatched via
SendMessageJob(3 retries, 10s backoff) - Incoming webhooks are processed via
ProcessWebhookJob(3 retries, 30s backoff) - Messages return immediately with
status: 'queued'
Run the queue worker:
Database Storage
When migrations are published and run, the package stores:
whatsapp_instances table
Tracks all WhatsApp instances with their connection status, settings, and QR codes.
whatsapp_messages table
Logs all incoming and outgoing messages with status tracking (sent_at, delivered_at, read_at).
whatsapp_webhooks table
Logs all webhook events with processing status and error tracking.
Disabling Storage
For lightweight usage without database:
Using the Trait
Add WhatsApp messaging to any class:
Available trait methods:
sendWhatsappText($to, $message, $instanceName)sendWhatsappImage($to, $url, $caption, $instanceName)sendWhatsappVideo($to, $url, $caption, $instanceName)sendWhatsappAudio($to, $url, $instanceName)sendWhatsappDocument($to, $url, $filename, $caption, $instanceName)sendWhatsappLocation($to, $lat, $lng, $name, $address, $instanceName)sendWhatsappContact($to, $fullName, $phone, $org, $instanceName)hasWhatsappInstance()— check if any instance is connectedgetConnectedWhatsappInstances()— get all connected instances
Laravel Notifications
Use WhatsApp as a Laravel notification channel:
Notification Message Types
Add the route to your User model (or any notifiable):
Send it:
Data Cleanup
Clean up old webhooks and messages:
Schedule it in your routes/console.php or app/Console/Kernel.php:
Configuration
Full configuration reference:
Enums
The package provides enums for type-safe usage:
Models
Access stored data via Eloquent models:
Error Handling
Architecture
Roadmap
This package is built with a driver-based architecture, making it easy to swap or add new WhatsApp providers without changing your application code.
Planned Drivers
| Driver | Status | Description |
|---|---|---|
evolution |
Available | Evolution API (unofficial, self-hosted) |
meta |
Planned | WhatsApp Cloud API (official, Meta-hosted) |
Switching Drivers (Future)
When the Meta driver is available, switching will be as simple as:
Your application code stays the same — WhatsApp::to('...')->text('...') works regardless of which driver is active.
Planned Features
- [ ] Meta WhatsApp Cloud API driver
- [ ] Template message support (for Meta Cloud API)
- [ ] Media upload to local storage with base64 conversion
- [ ] Rate limiting for outgoing messages
- [ ] Message scheduling (send later)
- [ ] Conversation/thread tracking
- [ ] Bulk messaging with progress tracking
Contributions for any of these are welcome!
Testing
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Security
If you discover a security vulnerability, please email [email protected] instead of opening an issue.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-whatsapp with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0