PHPackages                             zapwize/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. zapwize/laravel

ActiveLibrary[API Development](/categories/api)

zapwize/laravel
===============

Laravel package for Zapwize WhatsApp Web API integration

v1.3.5(7mo ago)05MITPHPPHP ^8.2CI failing

Since Sep 14Pushed 7mo agoCompare

[ Source](https://github.com/Will-create/laravel-zapwize)[ Packagist](https://packagist.org/packages/zapwize/laravel)[ Docs](https://github.com/Will-create/laravel-zapwize)[ GitHub Sponsors](https://github.com/sponsors/Will-create)[ RSS](/packages/zapwize-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (10)Used By (0)

Laravel Zapwize
===============

[](#laravel-zapwize)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1b44de4f2b9999e0e03b169e74db1728f1b1422d5c27a6167ba8d142fb1ceaf3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a617077697a652f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zapwize/laravel)[![Total Downloads](https://camo.githubusercontent.com/c0955e1e281f34d5e6b761027e8b1f3bf9517af2962eaac2219889a3dc8c652d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a617077697a652f6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zapwize/laravel)

This package provides a simple and expressive way to interact with the [Zapwize WhatsApp Web API](https://zapwize.com/) in your Laravel applications. Send text messages, images, videos, documents, and more with ease.

Features
--------

[](#features)

- Fluent and easy-to-use API
- Send various message types: text, image, video, audio, document, location, contact, poll
- Asynchronous message sending using Laravel Queues
- Webhook handling for incoming messages and status updates
- Secure webhook signature verification
- Automatic caching of server information for better performance
- Configurable logging and connection settings

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require zapwize/laravel
```

Configuration
-------------

[](#configuration)

1. Publish the configuration file:

    ```
    php artisan vendor:publish --provider="Zapwize\Laravel\ZapwizeServiceProvider" --tag="config"
    ```

    This will create a `config/zapwize.php` file in your application.
2. Add the following environment variables to your `.env` file:

    ```
    ZAPWIZE_API_KEY=your_zapwize_api_key

    # Optional queue settings
    ZAPWIZE_QUEUE_CONNECTION=database
    ZAPWIZE_QUEUE=zapwize
    ```

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 9, 10, 11 or 12

Usage
-----

[](#usage)

You can use the `Zapwize` facade to access the client methods.

### Sending Messages

[](#sending-messages)

#### Text Message

[](#text-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$response = Zapwize::sendMessage('1234567890', 'Hello from Laravel!');
```

#### Image Message

[](#image-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$media = [
    'url' => 'https://example.com/image.jpg',
    // or 'base64' => 'data:image/jpeg;base64,...'
];

$options = [
    'caption' => 'This is a caption.',
];

$response = Zapwize::sendImage('1234567890', $media, $options);
```

#### Video Message

[](#video-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$media = [
    'url' => 'https://example.com/video.mp4',
];

$options = [
    'caption' => 'This is a video.',
    'gif' => false, // Set to true for GIF videos
];

$response = Zapwize::sendVideo('1234567890', $media, $options);
```

#### Audio Message

[](#audio-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$media = [
    'url' => 'https://example.com/audio.mp3',
];

$response = Zapwize::sendAudio('1234567890', $media);
```

#### Document Message

[](#document-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$media = [
    'url' => 'https://example.com/document.pdf',
    'filename' => 'MyDocument.pdf',
];

$response = Zapwize::sendDocument('1234567890', $media);
```

#### Location Message

[](#location-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$response = Zapwize::sendLocation('1234567890', 37.7749, -122.4194);
```

#### Contact Message

[](#contact-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$contact = [
    'name' => 'John Doe',
    'phone' => '0987654321',
];

$response = Zapwize::sendContact('1234567890', $contact);
```

#### Poll Message

[](#poll-message)

```
use Zapwize\Laravel\Facades\Zapwize;

$poll = [
    'name' => 'What is your favorite color?',
    'options' => ['Red', 'Green', 'Blue'],
    'selectableCount' => 1,
];

$response = Zapwize::sendPoll('1234567890', $poll);
```

### Asynchronous Sending

[](#asynchronous-sending)

To send messages without blocking the main thread, you can use the `sendMessageAsync` method. Make sure your Laravel Queue is configured correctly.

```
use Zapwize\Laravel\Facades\Zapwize;

Zapwize::sendMessageAsync('1234567890', 'This message is sent asynchronously.');
```

### Webhooks

[](#webhooks)

To handle incoming messages and status updates, you need to set up a webhook.

1. In your `config/zapwize.php`, set `webhook.enabled` to `true` and configure the `webhook.url` and `webhook.secret`.
2. The package automatically registers the webhook route at `/zapwize/webhook`. You can customize this in the config file.
3. Listen for the `Zapwize\Laravel\Events\MessageReceived` event to process incoming messages:

    In your `EventServiceProvider.php`:

    ```
    protected $listen = [
        \Zapwize\Laravel\Events\MessageReceived::class => [
            \App\Listeners\ProcessIncomingWhatsAppMessage::class,
        ],
    ];
    ```

    Create the listener:

    ```
    namespace App\Listeners;

    use Zapwize\Laravel\Events\MessageReceived;

    class ProcessIncomingWhatsAppMessage
    {
        public function handle(MessageReceived $event)
        {
            $messageData = $event->message;
            // Process the incoming message...
        }
    }
    ```

### Other Methods

[](#other-methods)

#### Check if a number is a WhatsApp number

[](#check-if-a-number-is-a-whatsapp-number)

```
use Zapwize\Laravel\Facades\Zapwize;

$isWhatsAppNumber = Zapwize::isWhatsAppNumber('1234567890');
```

#### Get Server Information

[](#get-server-information)

```
use Zapwize\Laravel\Facades\Zapwize;

$serverInfo = Zapwize::getServerInfo();
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance68

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

9

Last Release

217d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0727d3a660838ead2df7ac2b90096229fe7ed11058805985a95704339a35c0f4?d=identicon)[Louis Bertson](/maintainers/Louis%20Bertson)

---

Top Contributors

[![Will-create](https://avatars.githubusercontent.com/u/58294883?v=4)](https://github.com/Will-create "Will-create (13 commits)")

---

Tags

apilaravelmessagingwebhookwhatsappzapwize

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/zapwize-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/zapwize-laravel/health.svg)](https://phpackages.com/packages/zapwize-laravel)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)[missael-anda/laravel-whatsapp

A Whatsapp Business Cloud API wrapper for Laravel.

677.5k](/packages/missael-anda-laravel-whatsapp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
