PHPackages                             shadowbane/laravel-wablas - 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-wablas

Abandoned → [shadowbane/laravel-whatsmeow](/?search=shadowbane%2Flaravel-whatsmeow)Project[Mail &amp; Notifications](/categories/mail)

shadowbane/laravel-wablas
=========================

Send Simple WhatsApp message via Wablas API

v1.0.3(4y ago)33541GPL-3.0-or-laterPHPPHP ^7.4 || ^8.0

Since Jun 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/shadowbane/laravel-wablas)[ Packagist](https://packagist.org/packages/shadowbane/laravel-wablas)[ RSS](/packages/shadowbane-laravel-wablas/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (3)Versions (11)Used By (0)

Laravel Wablas
==============

[](#laravel-wablas)

[![License: GPL v3](https://camo.githubusercontent.com/48bf9b56d44f38db53ce21294cf0b9487d0a3734ab3ba1fe4c69858ae20db2c1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c76332d626c75652e737667)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/1191306664b6280a05253d228bfff3116bf6a702f45b0e73ca40c2bcf2d9ffef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861646f7762616e652f6c61726176656c2d7761626c61732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shadowbane/laravel-wablas)

About
-----

[](#about)

This package provides easy integration with [Wablas Indonesia](https://wablas.com/), provider for sending WhatsApp message via HTTP API.

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

[](#installation)

install the package via composer:

```
composer require shadowbane/laravel-wablas
```

### Publishing Config

[](#publishing-config)

```
php artisan vendor:publish --provider="Shadowbane\LaravelWablas\LaravelWablasServiceProvider"

```

Usage
-----

[](#usage)

### Configuration

[](#configuration)

add the following value to your `.env` file

```
WABLAS_ENDPOINT=
WABLAS_TOKEN=
WHATSAPP_NUMBER_FIELD=
WHATSAPP_NUMBER_JSON_FIELD=
DEBUG_WHATSAPP_NUMBER=
```

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

`WABLAS_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 'production' and 'APP\_DEBUG' is set to true, to prevent sending it to real user.

### 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\LaravelWablas\Exceptions\FailedToSendNotification;
use Shadowbane\LaravelWablas\LaravelWablasChannel;
use Shadowbane\LaravelWablas\LaravelWablasMessage;

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 [LaravelWablasChannel::class];
    }

    /**
     * @param $notifiable
     *
     * @throws FailedToSendNotification
     *
     * @return LaravelWablasMessage
     */
    public function toWhatsapp($notifiable)
    {
        return LaravelWablasMessage::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 `LaravelWablasMessage` instance

```
    use Shadowbane\LaravelWablas\LaravelWablasMessage;

    ...

    public function toWhatsapp($notifiable)
    {
        return LaravelWablasMessage::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\LaravelWablas\LaravelWablasChannel;
use Shadowbane\LaravelWablas\LaravelWablasMessage;

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 [LaravelWablasChannel::class];
    }

    /**
     * @param $notifiable
     *
     * @return LaravelWablasMessage
     */
    public function toWhatsapp($notifiable)
    {
        return LaravelWablasMessage::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\LaravelWablas\LaravelWablasMessage;

    ...

    public function toWhatsapp($notifiable)
    {
        return LaravelWablasMessage::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

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~47 days

Total

9

Last Release

1628d ago

Major Versions

v1.0.3 → v2.0.0-alpha2021-07-13

PHP version history (3 changes)v1.0.0PHP ^7.4 || ^8.0

v2.0.0-alphaPHP ^8.0

v2.0.2-alphaPHP ^8.0|^8.1

### 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 (7 commits)")

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[laravel-notification-channels/expo

Expo Notifications Channel for Laravel

67628.6k1](/packages/laravel-notification-channels-expo)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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