PHPackages                             shadowbane/laravel-whatsmeow - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. shadowbane/laravel-whatsmeow

ActiveProject[Mail &amp; Notifications](/categories/mail)

shadowbane/laravel-whatsmeow
============================

Send Simple WhatsApp message via Whatsmeow API

v1.0.0(4y ago)6153GPL-3.0-or-laterPHPPHP ^8.0.2 || ^8.1

Since Apr 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/shadowbane/laravel-whatsmeow)[ Packagist](https://packagist.org/packages/shadowbane/laravel-whatsmeow)[ RSS](/packages/shadowbane-laravel-whatsmeow/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

Laravel WhatsMeow
=================

[](#laravel-whatsmeow)

[![License: GPL v3](https://camo.githubusercontent.com/48bf9b56d44f38db53ce21294cf0b9487d0a3734ab3ba1fe4c69858ae20db2c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76332d626c75652e737667)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/5c95122081a3ee910debf90cf5791f766f17ac14e70fbf0ad03642dad3877199/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861646f7762616e652f6c61726176656c2d77686174736d656f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shadowbane/laravel-whatsmeow)

About
-----

[](#about)

This package provides easy integration with [Whatsmeow](https://github.com/shadowbane/whatsmeow), my own API for sending WhatsApp message.

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

[](#installation)

install the package via composer:

```
composer require shadowbane/laravel-whatsmeow
```

### Publishing Config

[](#publishing-config)

```
php artisan vendor:publish --provider="Shadowbane\Whatsmeow\WhatsmeowServiceProvider"

```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

add the following value to your `.env` file

```
WHATSMEOW_ENDPOINT=
WHATSMEOW_TOKEN=
WHATSAPP_NUMBER_FIELD=
WHATSAPP_NUMBER_JSON_FIELD=
DEBUG_WHATSAPP_NUMBER=
```

`WHATSMEOW_ENDPOINT`Fill it with the url for Wablas API Endpoint.

`WHATSMEOW_TOKEN`This is the token generated from your Wablas account.

`WHATSAPP_NUMBER_FIELD`This is where you store the user's WhatsApp number in `users` table.

`WHATSAPP_NUMBER_JSON_FIELD`only fill this if you store user's WhatsApp number on JSON column in database, for example, the data might look like this:

```
{"whatsapp": 0123456}

```

`DEBUG_WHATSAPP_NUMBER`This is used when your `APP_ENV` is set to 'local' to prevent sending it to real user. It will send to debug number instead.

### Sending Text Message

[](#sending-text-message)

You can send text message using 'via' method inside notification class.

`app/notifications/WhatsAppNotification`:

```
namespace App\Notifications;

use Illuminate\Notifications\Notification;
use Shadowbane\Whatsmeow\Exceptions\FailedToSendNotification;
use Shadowbane\Whatsmeow\WhatsmeowChannel;
use Shadowbane\Whatsmeow\WhatsmeowMessage;

class WhatsappNotification extends Notification
{
    protected string $phoneNumber;
    protected string $message;

    /**
     * Create a new notification instance.
     *
     * @param string $phoneNumber
     * @param string $message;
     *
     * @return void
     */
    public function __construct(string $phoneNumber, string $message)
    {
        $this->phoneNumber = $phoneNumber;
        $this->message = $message;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     *
     * @return array
     */
    public function via($notifiable)
    {
        return [WhatsmeowChannel::class];
    }

    /**
     * @param $notifiable
     *
     * @throws FailedToSendNotification
     *
     * @return WhatsmeowMessage
     */
    public function toWhatsapp($notifiable)
    {
        return WhatsmeowMessage::create()
            ->to($this->phoneNumber)
            ->content($this->message);
    }
}
```

### Change token

[](#change-token)

If your application has multiple token for multiple purpose, you can chain `token($token)` method to your `WhatsmeowMessage` instance

```
    use Shadowbane\Whatsmeow\WhatsmeowMessage;

    ...

    public function toWhatsapp($notifiable)
    {
        return WhatsmeowMessage::create()
            ->token('this-is-another-token-in-my-application')
            ->to($this->phoneNumber)
            ->content($this->message);
    }
```

### Send Using The Notifiable Trait

[](#send-using-the-notifiable-trait)

If you want to send it via notifiable, you can refer to this example:

```
namespace App\Notifications;

use Illuminate\Notifications\Notification;
use Shadowbane\Whatsmeow\WhatsmeowChannel;
use Shadowbane\Whatsmeow\WhatsmeowMessage;

class WhatsappNotification extends Notification
{
    protected string $phoneNumber;
    protected string $message;

    /**
     * Create a new notification instance.
     *
     * @param string $message;
     *
     * @return void
     */
    public function __construct(string $message)
    {
        $this->message = $message;
    }

    /**
     * Get the notification's delivery channels.
     *
     * @param  mixed  $notifiable
     *
     * @return array
     */
    public function via($notifiable)
    {
        return [WhatsmeowChannel::class];
    }

    /**
     * @param $notifiable
     *
     * @return WhatsmeowMessage
     */
    public function toWhatsapp($notifiable)
    {
        return WhatsmeowMessage::create()
            ->content($this->message);
    }
}
```

Then, you can trigger it with:

```
use App\Notifications\WhatsappNotification;

$user->notify(new WhatsappNotification($message));
```

### Sending to Multiple Users

[](#sending-to-multiple-users)

This packages allows array to be passed as parameter in `to()` methods. As Wablas allows comma-separated values as phone number, we automatically implode the array, and send it as comma-separated value to Wablas API.

#### Example:

[](#example)

```
    use Shadowbane\Whatsmeow\WhatsmeowMessage;

    ...

    public function toWhatsapp($notifiable)
    {
        return WhatsmeowMessage::create()
            ->token('this-is-another-token-in-my-application')
            ->to([$destination1, $destination2])
            ->content($this->message);
    }
```

If you prefer to send it to notifiables, you can send it via notification facade.

```
use Illuminate\Support\Facades\Notification;
use App\Models\User;
use App\Notifications\WhatsappNotification;

Notification::send(User::whereSomeCondition(1)->get(), new WhatsappNotification(123) );
```

### Notes

[](#notes)

If you send it to notifiable, please make sure your `WHATSAPP_NUMBER_FIELD` reflecting the field where you store your user's WhatsApp number.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please send email to  instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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 ~18 days

Total

2

Last Release

1478d ago

Major Versions

v0.1.0 → v1.0.02022-04-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6396154?v=4)[Shadowbane](/maintainers/shadowbane)[@shadowbane](https://github.com/shadowbane)

---

Top Contributors

[![shadowbane](https://avatars.githubusercontent.com/u/6396154?v=4)](https://github.com/shadowbane "shadowbane (4 commits)")

---

Tags

laravelwhatsappwhatsmeowgomeow

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)

PHPackages © 2026

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