{"id":27535681,"url":"https://github.com/samuelterra22/laravel-evolution-client","last_synced_at":"2026-03-02T15:32:31.788Z","repository":{"id":287494181,"uuid":"964889611","full_name":"samuelterra22/laravel-evolution-client","owner":"samuelterra22","description":"Laravel Client for Evolution API, allowing easy integration with WhatsApp.","archived":false,"fork":false,"pushed_at":"2025-04-15T09:22:49.000Z","size":243,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T09:26:08.874Z","etag":null,"topics":["api","evolution","evolution-api","laravel","whatsapp"],"latest_commit_sha":null,"homepage":"https://github.com/samuelterra22/laravel-evolution-client","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuelterra22.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-12T01:09:31.000Z","updated_at":"2025-04-15T09:07:34.000Z","dependencies_parsed_at":"2025-04-15T09:26:13.858Z","dependency_job_id":"b8fffa61-cb93-492b-b9de-151b9681343c","html_url":"https://github.com/samuelterra22/laravel-evolution-client","commit_stats":null,"previous_names":["samuelterra22/evolution-client-php","samuelterra22/evolution-laravel-client","samuelterra22/laravel-evolution-client"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelterra22%2Flaravel-evolution-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelterra22%2Flaravel-evolution-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelterra22%2Flaravel-evolution-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuelterra22%2Flaravel-evolution-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuelterra22","download_url":"https://codeload.github.com/samuelterra22/laravel-evolution-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249535843,"owners_count":21287496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","evolution","evolution-api","laravel","whatsapp"],"created_at":"2025-04-18T19:10:09.624Z","updated_at":"2026-03-02T15:32:31.774Z","avatar_url":"https://github.com/samuelterra22.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Evolution Client\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/samuelterra22/laravel-evolution-client.svg?style=flat-square)](https://packagist.org/packages/samuelterra22/laravel-evolution-client)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/samuelterra22/laravel-evolution-client/run-tests?label=tests)](https://github.com/samuelterra22/laravel-evolution-client/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/samuelterra22/laravel-evolution-client/Check%20\u0026%20fix%20styling?label=code%20style)](https://github.com/samuelterra22/laravel-evolution-client/actions?query=workflow%3A\"Check+%26+fix+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/samuelterra22/laravel-evolution-client.svg?style=flat-square)](https://packagist.org/packages/samuelterra22/laravel-evolution-client)\n\nA Laravel client for the Evolution API, providing simple integration with WhatsApp for messaging, group management, and more.\n\n## Features\n\n- Complete WhatsApp functionality through Evolution API\n- Send and receive messages (text, media, buttons, lists, polls)\n- Create and manage groups\n- Manage contacts and labels\n- Handle webhook events\n- Simple and clean Laravel integration\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require samuelterra22/laravel-evolution-client\n```\n\nYou can publish the configuration file with:\n\n```bash\nphp artisan vendor:publish --tag=\"evolution-config\"\n```\n\nThis is the content of the published configuration file:\n\n```php\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | Evolution API Base URL\n    |--------------------------------------------------------------------------\n    |\n    | This is the base URL for the Evolution API endpoints. This should be\n    | the URL of your Evolution API server.\n    |\n    */\n    'base_url' =\u003e env('EVOLUTION_API_URL', 'http://localhost:8080'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Evolution API Key\n    |--------------------------------------------------------------------------\n    |\n    | This is your API key which is used to authenticate with the Evolution API.\n    | You can get this from your Evolution API configuration.\n    |\n    */\n    'api_key' =\u003e env('EVOLUTION_API_KEY', ''),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Default Instance Name\n    |--------------------------------------------------------------------------\n    |\n    | The default instance name to use when none is provided.\n    |\n    */\n    'default_instance' =\u003e env('EVOLUTION_DEFAULT_INSTANCE', 'default'),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Request Timeout\n    |--------------------------------------------------------------------------\n    |\n    | This value determines the maximum number of seconds to wait for a response\n    | from the Evolution API server.\n    |\n    */\n    'timeout' =\u003e env('EVOLUTION_API_TIMEOUT', 30),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Webhook URL\n    |--------------------------------------------------------------------------\n    |\n    | The URL where Evolution API will send webhook events.\n    |\n    */\n    'webhook_url' =\u003e env('EVOLUTION_WEBHOOK_URL', null),\n\n    /*\n    |--------------------------------------------------------------------------\n    | Webhook Events\n    |--------------------------------------------------------------------------\n    |\n    | The events that should trigger the webhook.\n    |\n    */\n    'webhook_events' =\u003e [\n        'message',\n        'message.ack',\n        'status.instance',\n        // Add more events as needed\n    ],\n];\n```\n\n## Usage\n\n### Configuring the .env\n\n```\nEVOLUTION_API_URL=http://your-evolution-api.com\nEVOLUTION_API_KEY=your-api-key\nEVOLUTION_DEFAULT_INSTANCE=default\n```\n\n### Using the Facade\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// Check QR Code\n$qrCode = Evolution::getQrCode();\n\n// Check if connected\n$connected = Evolution::isConnected();\n\n// Send text message\n$result = Evolution::sendText('5511999999999', 'Hello, this is a test message!');\n```\n\n### Using Different Instances\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// Use a specific instance\n$result = Evolution::instance('my-instance')-\u003esendText('5511999999999', 'Hello!');\n```\n\n### Working with Chats\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// List all chats\n$chats = Evolution::chat-\u003eall();\n\n// Find a specific chat\n$chat = Evolution::chat-\u003efind('5511999999999');\n\n// Get messages from a chat\n$messages = Evolution::chat-\u003emessages('5511999999999', 20);\n\n// Mark a chat as read\nEvolution::chat-\u003emarkAsRead('5511999999999');\n```\n\n### Working with Groups\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// List all groups\n$groups = Evolution::group-\u003eall();\n\n// Create a new group\n$newGroup = Evolution::group-\u003ecreate('Group Name', [\n    '5511999999999',\n    '5511888888888',\n]);\n\n// Add participants to a group\nEvolution::group-\u003eaddParticipants($groupId, [\n    '5511777777777',\n]);\n\n// Promote to admin\nEvolution::group-\u003epromoteToAdmin($groupId, '5511999999999');\n```\n\n### Sending Different Types of Messages\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\nuse SamuelTerra22\\LaravelEvolutionClient\\Models\\Button;\nuse SamuelTerra22\\LaravelEvolutionClient\\Models\\ListRow;\nuse SamuelTerra22\\LaravelEvolutionClient\\Models\\ListSection;\n\n// Send text\nEvolution::message-\u003esendText('5511999999999', 'Hello, how are you?');\n\n// Send text with delay and link preview\nEvolution::message-\u003esendText('5511999999999', 'Check out this website: https://example.com', false, 1000, true);\n\n// Send image\nEvolution::message-\u003esendImage('5511999999999', 'https://example.com/image.jpg', 'Image caption');\n\n// Send document\nEvolution::message-\u003esendDocument('5511999999999', 'https://example.com/document.pdf', 'filename.pdf', 'Check out this document');\n\n// Send location\nEvolution::message-\u003esendLocation('5511999999999', -23.5505, -46.6333, 'São Paulo', 'Paulista Avenue, 1000');\n\n// Send contact\nEvolution::message-\u003esendContact('5511999999999', 'Contact Name', '5511888888888');\n\n// Send poll\nEvolution::message-\u003esendPoll('5511999999999', 'What is your favorite color?', 1, ['Blue', 'Green', 'Red', 'Yellow']);\n\n// Send list\n$rows1 = [\n    new ListRow('Option 1', 'Description of option 1', 'opt1'),\n    new ListRow('Option 2', 'Description of option 2', 'opt2')\n];\n$rows2 = [\n    new ListRow('Option 3', 'Description of option 3', 'opt3'),\n    new ListRow('Option 4', 'Description of option 4', 'opt4')\n];\n\n$sections = [\n    new ListSection('Section 1', $rows1),\n    new ListSection('Section 2', $rows2)\n];\n\nEvolution::message-\u003esendList(\n    '5511999999999',\n    'List Title',\n    'Choose an option',\n    'View Options',\n    'List footer',\n    $sections\n);\n\n// Send buttons\n$buttons = [\n    new Button('reply', 'Yes', ['id' =\u003e 'btn-yes']),\n    new Button('reply', 'No', ['id' =\u003e 'btn-no']),\n    new Button('url', 'Visit Website', ['url' =\u003e 'https://example.com'])\n];\n\nEvolution::message-\u003esendButtons(\n    '5511999999999',\n    'Confirmation',\n    'Do you want to proceed with the operation?',\n    'Choose an option below',\n    $buttons\n);\n\n// Send reaction to a message\nEvolution::message-\u003esendReaction(\n    ['remoteJid' =\u003e '5511999999999@c.us', 'id' =\u003e 'ABCDEF123456', 'fromMe' =\u003e false],\n    '👍'\n);\n\n// Send status\nEvolution::message-\u003esendStatus(\n    'text',\n    'Hello, this is my status!',\n    null,\n    '#25D366',\n    2,\n    true\n);\n```\n\n### Working with Labels\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// List all labels\n$labels = Evolution::label-\u003efindLabels();\n\n// Add a label to a chat\nEvolution::label-\u003eaddLabel('5511999999999', 'label_id_123');\n\n// Remove a label from a chat\nEvolution::label-\u003eremoveLabel('5511999999999', 'label_id_123');\n```\n\n### Working with Calls\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// Make a fake call\nEvolution::call-\u003efakeCall('5511999999999', false, 45); // Voice call with 45 seconds\nEvolution::call-\u003efakeCall('5511999999999', true, 30);  // Video call with 30 seconds\n```\n\n### Working with Profile\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// Fetch a contact's profile\n$profile = Evolution::profile-\u003efetchProfile('5511999999999');\n\n// Fetch business profile\n$businessProfile = Evolution::profile-\u003efetchBusinessProfile('5511999999999');\n\n// Update profile name\nEvolution::profile-\u003eupdateProfileName('My Name');\n\n// Update status\nEvolution::profile-\u003eupdateProfileStatus('Available for service');\n\n// Update profile picture\nEvolution::profile-\u003eupdateProfilePicture('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQE...');\n\n// Remove profile picture\nEvolution::profile-\u003eremoveProfilePicture();\n\n// Fetch privacy settings\n$privacySettings = Evolution::profile-\u003efetchPrivacySettings();\n\n// Update privacy settings\nEvolution::profile-\u003eupdatePrivacySettings(\n    'all',               // readreceipts\n    'contacts',          // profile\n    'contacts',          // status\n    'all',               // online\n    'contacts',          // last\n    'contacts'           // groupadd\n);\n```\n\n### Working with WebSocket\n\n```php\nuse SamuelTerra22\\LaravelEvolutionClient\\Facades\\Evolution;\n\n// Configure WebSocket\nEvolution::websocket-\u003esetWebSocket(true, [\n    'message',\n    'message.ack',\n    'status.instance'\n]);\n\n// Fetch WebSocket configuration\n$webSocketConfig = Evolution::websocket-\u003efindWebSocket();\n\n// Create a WebSocket client\n$webSocketClient = Evolution::websocket-\u003ecreateClient();\n\n// Register handlers for events\n$webSocketClient-\u003eon('message', function ($data) {\n    // Process received message\n    Log::info('New message received', $data);\n});\n\n$webSocketClient-\u003eon('message.ack', function ($data) {\n    // Process read confirmation\n    Log::info('Message read', $data);\n});\n\n// Connect to WebSocket server\n$webSocketClient-\u003econnect();\n\n// ... At some later point, disconnect\n$webSocketClient-\u003edisconnect();\n```\n\nWorking with Templates\n\n```php\n// Create a template\n$response = Evolution::template-\u003ecreate(\n    'my_template',\n    'MARKETING',\n    'en_US',\n    [\n        [\n            'type' =\u003e 'BODY',\n            'text' =\u003e 'Hello {{1}}, welcome to our service!',\n            'example' =\u003e [\n                'body_text' =\u003e [\n                    ['John Doe']\n                ]\n            ]\n        ],\n        [\n            'type' =\u003e 'BUTTONS',\n            'buttons' =\u003e [\n                [\n                    'type' =\u003e 'QUICK_REPLY',\n                    'text' =\u003e 'Yes, please'\n                ],\n                [\n                    'type' =\u003e 'QUICK_REPLY',\n                    'text' =\u003e 'No, thanks'\n                ]\n            ]\n        ]\n    ]\n);\n\n// Find templates\n$templates = Evolution::template-\u003efind();\n\n// Send a template message\nEvolution::message-\u003esendTemplate(\n    '5511999999999',\n    'my_template',\n    'en_US',\n    [\n        [\n            'type' =\u003e 'body',\n            'parameters' =\u003e [\n                [\n                    'type' =\u003e 'text',\n                    'text' =\u003e 'John Doe'\n                ]\n            ]\n        ]\n    ]\n);\n```\n\nManaging Settings\n\n```php\n// Set instance settings\nEvolution::settings-\u003eset(\n    true,  // reject calls\n    'I cannot take calls right now', // call message\n    false, // don't ignore groups\n    true,  // always show online\n    false, // don't read messages automatically\n    false, // don't sync full history\n    false  // don't read status automatically\n);\n\n// Get current settings\n$settings = Evolution::settings-\u003efind();\n```\n\nUsing Proxy\n```php\n// Set proxy\nEvolution::proxy-\u003eset(\n    true,     // enabled\n    '127.0.0.1', // host\n    '8080',   // port\n    'http',   // protocol\n    'username', // optional\n    'password'  // optional\n);\n\n// Get current proxy settings\n$proxy = Evolution::proxy-\u003efind();\n```\n\n## Testing\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see the [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\n\nIf you discover any security-related issues, please email samuelterra22@gmail.com instead of using the issue tracker.\n\n## Credits\n\n- [Samuel Terra](https://github.com/samuelterra22)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see the [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelterra22%2Flaravel-evolution-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuelterra22%2Flaravel-evolution-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuelterra22%2Flaravel-evolution-client/lists"}