tomatophp/filament-discord
Composer 安装命令:
composer require tomatophp/filament-discord
包简介
Send Notification to discord channel Webhook using native FilamentPHP Notification Facade class
关键字:
README 文档
README
Filament Discord Notifications
Send Notification to discord channel Webhook using native FilamentPHP Notification Facade class
Screenshots
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
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; use ProtoneMedia\Splade\Http\SpladeMiddleware; 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"
Other Filament Packages
Checkout our Awesome TomatoPHP
tomatophp/filament-discord 适用场景与选型建议
tomatophp/filament-discord 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.12k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 07 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「laravel」 「discord」 「filament-plugin」 「filamentphp」 「tomatophp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tomatophp/filament-discord 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tomatophp/filament-discord 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tomatophp/filament-discord 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple monolog handler for support Discord webhooks
A simple package to create tables in Discord messages.
PHP library retrieve game servers status from various types of games.
Alfabank REST API integration
Post messages to discord.
统计信息
- 总下载量: 3.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 8
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-09



