tomatophp/filament-discord

Send Notification to discord channel Webhook using native FilamentPHP Notification Facade class
3,166 2
Install
composer require tomatophp/filament-discord
Latest Version:5.0.0
PHP:^8.2
License:MIT
Last Updated:Sep 15, 2026
Links: GitHub  ·  Packagist
Maintainer: fadymondy

Screenshot

Filament Discord Notifications

Latest Stable Version License Downloads

Send Notification to discord channel Webhook using native FilamentPHP Notification Facade class

Screenshots

Notification Error Log Error Log Link

Requirements

Package version Filament Laravel PHP
5.x 5.x 12.x, 13.x 8.2+
1.x 3.x 10.x, 11.x 8.1+

The Filament v3 line continues on the v3 branch.

Installation

composer require tomatophp/filament-discord

after install on your .env file set

DISCORD_WEBHOOK=
DISCORD_ERROR_WEBHOOK=
DISCORD_ERROR_WEBHOOK_ACTIVE=

where DISCORD_WEBHOOK the main notification channel webhook and DISCORD_ERROR_WEBHOOK is the error logger channel webhook and DISCORD_ERROR_WEBHOOK_ACTIVE to be true or false to active and stop logger

When no webhook is configured the messages are skipped, so the package is safe to install before you create the Discord webhooks. Messages are sent from a queued job, so keep a queue worker running (or use the sync queue).

Using

you can send notification to discord with multi-way the first of it is using native FilamentPHP Notification::class

use \Filament\Notifications\Notification;

Notification::make()
    ->title('Hi')
    ->body('Welcome On The Moon!')
    ->sendToDiscord()

you can attach image to the message like this

use \Filament\Notifications\Notification;

Notification::make()
    ->title('Hi')
    ->body('Welcome On The Moon!')
    ->sendToDiscord(image: "https://raw.githubusercontent.com/tomatophp/filament-discord/master/arts/3x1io-tomato-discord.jpg")

Send to Selected User

you can send a notification to selected user webhook by add a column on your user table with name webhook and then add this tait to User model

use TomatoPHP\FilamentDiscord\Traits\InteractsWithDiscord;

class User {
    use InteractsWithDiscord;
}

and now you can send notification to the user like this

use \Filament\Notifications\Notification;

Notification::make()
    ->title('Hi')
    ->body('Welcome On The Moon!')
    ->sendToDiscord($user)

Allow Discord Error Logger

you can use Discord channel as an error logger to log and followup your error with a very easy way, on your bootstrap/app.php add this class like this

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api.php',
        commands: __DIR__.'/../routes/console.php',
        channels: __DIR__.'/../routes/channels.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
    })
    ->withExceptions(function (Exceptions $exceptions) {
        \TomatoPHP\FilamentDiscord\Helpers\DiscordErrorReporter::make($exceptions);
    })->create();

Publish Assets

you can publish config file by use this command

php artisan vendor:publish --tag="filament-discord-config"

Testing

composer test

Other Filament Packages

Checkout our Awesome TomatoPHP

Related Packages

tomatophp/filament-api

Generate APIs from your filament resource using single line of code

7,492 54
tomatophp/filament-types

Manage any type on your app in Database with easy to use Resource for FilamentPH...

20,452 58
tomatophp/filament-pwa

get a PWA feature on your FilamentPHP app with settings from panel

26,718 93
tomatophp/filament-language-switcher

Switch between languages on your app using user base column on database

36,367 37
tomatophp/filament-invoices

Generate and manage your invoices / payments using multi currencies and multi ty...

4,377 108