dits-sa/reqdesk-filament-widget
Composer 安装命令:
composer require dits-sa/reqdesk-filament-widget
包简介
Production-ready Filament v4/v5 plugin for the Reqdesk support widget — inject, configure and HMAC-sign the widget from inside your Filament panel.
README 文档
README
Drop the Reqdesk support widget into any Filament v4 or v5 panel, configure every option from a native settings page, and HMAC-sign authenticated Laravel users so they never see a second login.
use Reqdesk\Filament\ReqdeskWidgetPlugin; public function panel(Panel $panel): Panel { return $panel->plugin(ReqdeskWidgetPlugin::make()); }
That's the whole wire-up. REQDESK_API_KEY + REQDESK_SIGNING_SECRET in .env, plus the line above, and your admins see the widget already logged in as themselves.
Table of contents
- Why this plugin
- Requirements
- 60-second quickstart
- Configuration reference — every setting, every env var
- Signed host-app identity — how the no-login flow works + custom resolvers
- Security & threat model
- Custom menu actions cookbook
- Multi-panel & multi-tenant
- Troubleshooting
- Upgrade guide
- Contributing
- Security policy
- Changelog
Why this plugin
Laravel teams running Filament already have the information Reqdesk needs in order to trust a user: the session and the user's email. This plugin closes the loop so there's no second login prompt, no user-pasted email form, and no redirect ping-pong — the widget opens straight into the admin's ticket history.
- One-line registration on your
PanelProvider. - Render hook injection into
PanelsRenderHook::BODY_END, scoped to the panel you register it on. No global script tag, no layout edits. - Signed host-app identity by default — Laravel's authenticated user is HMAC-signed (
sha256={hex}over"{ts}.{email}") so the widget trusts the email without an SSO round-trip. - Swappable resolver — implement
WidgetUserResolverwhen your user model doesn't expose->email/->namedirectly. - Two-mode auth — the widget automatically switches between
auth_mode_when_signed(defaultsigned) andauth_mode_when_anonymous(defaultemail) based on Laravel's session. - Full settings page covering every
ReqdeskWidgetConfigkey across seven tabs. spatie/laravel-settingspersistence with encryptedapi_keyandsigning_secretcolumns and env-backed first-load defaults.- Install + doctor commands that fail fast on missing env vars and run a non-destructive health check.
- Strict mode (
REQDESK_STRICT=true) promotes missing configuration to a hard exception at boot — great for staging, off by default in production. - Arabic and English translations shipped.
Requirements
| Package | Version |
|---|---|
| PHP | 8.2, 8.3, 8.4 |
| Laravel | 11.28+, 12.x |
| Filament | 4.x or 5.x |
| spatie/laravel-settings | 3.4+ |
Laravel 11.0 – 11.27 is supported only on the Filament 4.x lane; Filament 5 requires Laravel 11.28+.
Installation at a glance
composer require dits-sa/reqdesk-filament-widget php artisan reqdesk-widget:install
REQDESK_API_KEY=rqd_pk_your_project_key REQDESK_SIGNING_SECRET=your_server_side_hmac_secret
->plugin(ReqdeskWidgetPlugin::make())
Full walkthrough: docs/01-quickstart.md. The install command
runs the package migration non-interactively, so CI / --no-interaction deploys
land with the settings table populated.
Navigation & placement
By default the settings page appears under its own "Reqdesk" group with a lifebuoy icon. Place it under an existing group, pin a sort position, and swap the icon with the fluent builders:
use App\Filament\Navigation\NavigationGroup; use Reqdesk\Filament\ReqdeskWidgetPlugin; $panel->plugin( ReqdeskWidgetPlugin::make() ->navigationGroup(NavigationGroup::Support) // string or UnitEnum ->navigationSort(60) ->navigationIcon('heroicon-o-chat-bubble-left-right') // string or BackedEnum );
Any of the three builders may be omitted; omitted ones keep their existing defaults. The group accepts plain unit enums as well as backed enums, matching Filament's own navigation signature.
Access control
The settings page exposes api_key and signing_secret, so multi-role panels
should gate it. Pass a Gate ability or a closure to authorize():
// String ability — pairs with a Gate::define(...) or a Policy $panel->plugin( ReqdeskWidgetPlugin::make()->authorize('reqdesk.settings.manage') ); // Closure — receives the current user (nullable) $panel->plugin( ReqdeskWidgetPlugin::make()->authorize( fn ($user): bool => $user?->isAdmin() ?? false, ) );
When authorize() is not called the page stays accessible (unchanged default).
bezhansalleh/filament-shield consumers can leave authorize() unset and rely
on Shield's per-page permission auto-discovery — ReqdeskSettings participates
in shield:generate like any other Filament page.
Multi-panel usage
Each ->plugin(ReqdeskWidgetPlugin::make()) call produces its own plugin
instance, and the render hook is scoped to the registering panel's id. Two
panels, two independent configurations:
// AdminPanelProvider $panel->plugin(ReqdeskWidgetPlugin::make()->navigationGroup('Support')); // AgentPanelProvider — widget only, no settings page $panel->plugin( ReqdeskWidgetPlugin::make() ->registerSettingsPage(false) );
The widget is injected only into the panels that register the plugin.
See docs/06-multi-panel.md for the deep dive.
Custom guards & identity middleware
The signed-identity refresh endpoint is protected by web,auth by default.
Consumers on a non-default guard (for example a Filament panel authenticated
through auth:agent or a portal using a custom session driver) can override
the middleware stack via env:
# Single non-default guard REQDESK_IDENTITY_MIDDLEWARE=web,auth:agent # Multiple guards — auth middleware tries each left-to-right REQDESK_IDENTITY_MIDDLEWARE=web,auth:web,agent
The endpoint itself can also be moved:
REQDESK_IDENTITY_ENDPOINT=/support/identity
Both values are also exposed through config/reqdesk-widget.php under the
identity key if you prefer a published config over env.
See docs/03-identity.md for the full identity flow.
License
MIT — see LICENSE.md.
dits-sa/reqdesk-filament-widget 适用场景与选型建议
dits-sa/reqdesk-filament-widget 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「support」 「laravel」 「widget」 「helpdesk」 「filament」 「filament-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dits-sa/reqdesk-filament-widget 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dits-sa/reqdesk-filament-widget 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dits-sa/reqdesk-filament-widget 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Yii2 LightBox image galary widget uses Lightbox v2.10.0 by Lokesh Dhakar
Add a weather widget to Flarum
a simple toolkit for social networks
ARCANEDEV Support Helpers
Yii2 prettyPhoto image galary widget uses Lightbox view control jquery.prettyphoto.js
Yii2 DynaTree Menu widget uses Dynamic tree view control jquery.dynatree.js
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-23