Download the PHP package happones/laravel-evolution-client without Composer
On this page you can find all versions of the php package happones/laravel-evolution-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download happones/laravel-evolution-client
More information about happones/laravel-evolution-client
Files in happones/laravel-evolution-client
Package laravel-evolution-client
Short Description Laravel Client for Evolution API, allowing easy integration with WhatsApp.
License MIT
Homepage https://github.com/happones/laravel-evolution-client
Informations about the package laravel-evolution-client
Laravel Evolution Client
A Laravel client for the Evolution API, providing simple integration with WhatsApp for messaging, group management, and more.
Features
- Complete WhatsApp functionality through Evolution API
- Send and receive messages (text, media, buttons, lists, polls)
- Create and manage groups
- Manage contacts and labels
- Handle webhook events
- Simple and clean Laravel integration
Requirements
- PHP 8.3+
- Laravel 11, 12 or 13
- An Evolution API v2 server
Installation
You can install the package via composer:
You can publish the configuration file with:
This is the content of the published configuration file:
Usage
Configuring the .env
Using the Facade
Using Different Instances
instance() returns a new client bound to that instance and never mutates the shared
container singleton, so it is safe in queue workers and Laravel Octane: one job or request
can never inherit another's instance name. Always chain from instance() (or keep the
returned client) instead of calling it for its side effect.
Phone numbers are sent as bare digits with country code (e.g. 5511999999999), as
Evolution API v2 expects; any value that already contains @ ([email protected],
[email protected], ...@lid) is passed through unchanged.
Linking a Device (QR or Pairing Code)
Working with Chats
Working with Groups
Sending Different Types of Messages
Working with Labels
Working with Calls
Working with Profile
Working with WebSocket
Working with Templates
Managing Settings
Evolution Bot
Using Proxy
Handling Webhooks
Evolution API delivers events (incoming messages, connection changes, QR updates, …) to a
URL you configure. This package parses those payloads into a typed WebhookEvent and
exposes them for use.
1. Register the endpoint. Enable the built-in route in config/evolution.php:
Point your instance webhook at https://your-app.test/evolution/webhook. (Or build your
own controller and call WebhookProcessor::process($request) yourself.)
Secure the endpoint. Evolution API does not sign webhooks, so the package checks a
shared secret sent as a custom header. Set EVOLUTION_WEBHOOK_SECRET and register the same
value as a header on the instance webhook:
Requests without the matching header (EVOLUTION_WEBHOOK_SECRET_HEADER, default
X-Evolution-Secret) get 401; payloads without an event get 422. When the secret is
empty the header check is skipped, so always set it on public endpoints. The check lives in
the VerifyEvolutionWebhook middleware, which you can also attach to your own route.
2. Listen for events. Every webhook dispatches EvolutionWebhookReceived, plus a
named evolution.webhook.{event} event:
Make your listener implement ShouldQueue to process it on a queue.
3. (Optional) Queue at the edge. To return 200 to Evolution instantly and process
off the request lifecycle, enable the queue — a ProcessEvolutionWebhook job is dispatched
instead of running inline:
You can also register inline callbacks without Laravel events:
Testing
Changelog
Please see the CHANGELOG for more information about what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Credits
- Samuel Terra
- All Contributors
License
The MIT License (MIT). Please see the License File for more information.
All versions of laravel-evolution-client with dependencies
guzzlehttp/guzzle Version ^7.8|^8.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
ratchet/pawl Version ^0.4.1
react/event-loop Version ^1.3
react/socket Version ^1.12