PHPackages                             vntrungld/laravel-zalo-bot - 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. vntrungld/laravel-zalo-bot

ActiveLibrary[API Development](/categories/api)

vntrungld/laravel-zalo-bot
==========================

Laravel integration for the Zalo Bot Platform API — facade, webhook handling, notification channel, and Artisan commands.

v0.1.0(3d ago)03MITPHP ^8.1

Since Jul 7Compare

[ Source](https://github.com/vntrungld/laravel-zalo-bot)[ Packagist](https://packagist.org/packages/vntrungld/laravel-zalo-bot)[ Docs](https://github.com/vntrungld/laravel-zalo-bot)[ RSS](/packages/vntrungld-laravel-zalo-bot/feed)WikiDiscussions Synced today

READMEChangelogDependencies (6)Versions (2)Used By (0)

Laravel Zalo Bot
================

[](#laravel-zalo-bot)

Laravel integration for the [Zalo Bot Platform API](https://bot.zapps.me/docs/), wrapping [`vntrungld/zalo-bot-php-sdk`](https://github.com/vntrungld/zalo-bot-php-sdk).

Install
-------

[](#install)

```
composer require vntrungld/laravel-zalo-bot
php artisan vendor:publish --tag=zalo-bot-config
```

Set in `.env`:

```
ZALO_BOT_TOKEN="{id}:{secret}"
ZALO_BOT_SECRET_TOKEN="a-long-webhook-secret"
```

Sending messages
----------------

[](#sending-messages)

```
use Vntrungld\LaravelZaloBot\Facades\ZaloBot;

ZaloBot::sendMessage($chatId, 'Xin chào!');
```

Or inject `ZaloBot\Client` directly.

Webhook
-------

[](#webhook)

A `POST /zalo-bot/webhook` route is registered automatically (configurable via `ZALO_BOT_WEBHOOK_PATH`). It verifies the `X-Bot-Api-Secret-Token` header and dispatches an event:

> **Security:** if `ZALO_BOT_SECRET_TOKEN` is unset while the webhook is enabled, signature verification is skipped and the endpoint accepts unauthenticated requests. Always set `ZALO_BOT_SECRET_TOKEN` in production.

```
use Vntrungld\LaravelZaloBot\Events\ZaloUpdateReceived;

Event::listen(function (ZaloUpdateReceived $e) {
    $text = $e->update->message->text;
    // ...
});
```

Register the URL with Zalo:

```
php artisan zalo-bot:webhook:set https://your-app.test/zalo-bot/webhook
php artisan zalo-bot:webhook:info
php artisan zalo-bot:webhook:delete
```

Notifications
-------------

[](#notifications)

```
use Illuminate\Notifications\Notification;
use Vntrungld\LaravelZaloBot\Notifications\ZaloMessage;

class Reminder extends Notification
{
    public function via($notifiable): array
    {
        return ['zalo'];
    }

    public function toZalo($notifiable): ZaloMessage
    {
        return ZaloMessage::text('Cuộc hẹn lúc 3 giờ chiều');
    }
}
```

Route the notifiable by adding `routeNotificationForZalo()` returning the chat id, or call `->to($chatId)` on the message.

License
-------

[](#license)

MIT.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance99

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

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

Unknown

Total

1

Last Release

3d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39490e25f48deaf067db160681117abc2bdcf818fdce03a30eebc1ee25b784a0?d=identicon)[vntrungld](/maintainers/vntrungld)

---

Tags

laravelmessagingwebhookbotchatbotnotification-channelzalozalo-bot

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vntrungld-laravel-zalo-bot/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)

PHPackages © 2026

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