Download the PHP package manzar/laravel-whatsapp-cloud without Composer
On this page you can find all versions of the php package manzar/laravel-whatsapp-cloud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-whatsapp-cloud
Laravel WhatsApp Cloud
A Laravel package for integrating with the WhatsApp Cloud API.
Requirements
- PHP 8.2+
- Laravel 12+
Installation
Publish config:
Configuration
Set the following in .env:
Webhook security modes
WHATSAPP_WEBHOOK_ENFORCE_SIGNATURE=true: signature requiredWHATSAPP_WEBHOOK_ENFORCE_SIGNATURE=false: signature optional (recommended only for local/testing)
Basic usage
Media helpers
Downloading received media
Incoming media messages (images, documents, audio, video, stickers) contain a media_id. Meta requires an authenticated request to fetch the binary — you cannot access the URL directly.
Note: The temporary URL returned by
getMediaUrl()expires quickly. UsedownloadMedia()ordownloadMediaTo()to fetch the binary immediately rather than storing the URL for later use.
Template management
Dynamic variable requirement
When template creation text contains placeholders such as {{1}} or {{2}}, example values are required.
buildTemplateCreatePayload()enforces examples at build time.templates()->create()validates that dynamic components include examples.
Webhook routes
By default, the package registers:
GET /whatsapp/webhookfor verificationPOST /whatsapp/webhookfor incoming events
Events dispatched:
Manzar\WhatsAppCloud\Events\WebhookReceivedManzar\WhatsAppCloud\Events\MessageReceivedManzar\WhatsAppCloud\Events\StatusUpdated
Validation limits
Interactive buttons/list
- Reply buttons: max 3
- Reply button title: max 20 characters
- List button text: max 20 characters
- List sections: max 10
- Rows per section: max 10
- Total rows across all sections: max 10
- Row id: max 200 characters
- Row title: max 24 characters
- Row description: max 72 characters
Template message
- Header component parameters: exactly 1
- Body component parameters: 1 to 10
- Button component parameters: exactly 1
- Button subtype:
urlorquick_reply
Optional database persistence
The package can automatically persist webhook payloads, incoming messages, and delivery status updates to your database. It is disabled by default — zero tables are touched unless you opt in.
Setup
-
Publish and run the migrations:
- Enable in
.env:
To also log every outgoing message:
Tables created
| Table | Contains |
|---|---|
whatsapp_webhook_logs |
Raw payload for every webhook request |
whatsapp_incoming_messages |
Normalised row per received message (text, image, interactive, etc.) |
whatsapp_message_statuses |
Every sent/delivered/read/failed status update with pricing and conversation info |
whatsapp_outgoing_messages |
Record per outgoing message with type-specific columns and delivery status |
Models
Custom storage driver
Implement Manzar\WhatsAppCloud\Contracts\WhatsAppStorageInterface and bind it in your AppServiceProvider:
Then set:
Notes
- Raw Graph API access remains available via
WhatsApp::raw(). - Flow payload support is provided as a foundation via
sendFlow()andflow()builder access. - Template update behavior depends on current Graph API support and permissions.
All versions of laravel-whatsapp-cloud with dependencies
illuminate/support Version ^12.0
illuminate/http Version ^12.0
illuminate/events Version ^12.0