tomatophp/filament-withdrawals
Filament Withdrawals lets you manage withdrawal methods, custom fields, and withdrawal requests directly from your Filament admin panel. Register the plugin, run the installer, and extend forms with custom field types.
relations allowlist in config/filament-withdrawals.php. This converts a previously dynamic, editor-controlled query surface into an explicit, operator-owned policy. Architecturally sound, but it introduces a new required configuration artifact that must be owned and maintained.filament-withdrawals:install, plugin registration in AdminPanelProvider, plus (new) config publishing if relation fields are used.composer.json; the v5 line implies a recent Filament major. Verify before committing.| Risk Area | Assessment | Mitigation Strategy |
|---|---|---|
| Pre-5.0.1 Data Exposure (Critical) | Relation fields accepted any class and any column typed into the field editor. A field set to App\Models\User + password rendered password hashes for every user into the withdrawal request form; arbitrary class names had ::all() invoked. Treat any prior deployment as potentially exposed. |
Upgrade to v5.0.1 immediately. Run a retrospective: audit saved withdrawal form definitions and field-editor history, determine whether sensitive columns were ever selected, and assess whether rendered forms were viewed/captured. Escalate to security/legal per your incident process. |
| Privileged Editor Surface | The vulnerability's blast radius came from who could edit form fields. Field-editor access is effectively a data-access grant. | Restrict form-builder/field-editor permissions to a small, named group. Add this to RBAC review. Treat it as a privileged role, not a content-editing role. |
| Empty Allowlist After Upgrade | Relation fields silently render without options until configured. | Publish config and populate the allowlist in the same change window as the upgrade. Add to the release checklist. |
| Allowlist Over-Permissioning | Allowlist is a query allowlist, not an authorization model; $hidden handling is defense-in-depth, not a substitute for scoping. |
Allowlist the minimum models and columns per use case (e.g. Bank::class => ['name']). Never allowlist user/credential models. Review on every form change. |
| Filament Version Lock | Package may pin a Filament major version. | Pin Filament in composer.json; test upgrades in staging. |
| Custom Logic Gaps | Thin documentation on edge cases (failed payouts, reversals). | Extend via service providers/middleware; budget for custom code. |
| Performance | Heavy Filament tables/forms degrade at scale. | Pagination, lazy loading, indexing on status/created_at. |
| Data Migration | Existing withdrawal schemas may conflict. | Publish and review migrations before adoption. |
config/filament-withdrawals.php? Is it code-reviewed like a schema or permission change?config/filament-withdrawals.php is now a first-class integration artifact alongside migrations and language files. Treat it as deployable configuration under version control.decimal for balances).composer require tomatophp/filament-withdrawals
php artisan filament-withdrawals:install
AdminPanelProvider.php.php artisan vendor:publish --tag="filament-withdrawals-config"
php artisan vendor:publish --tag="filament-withdrawals-migrations"
php artisan vendor:publish --tag="filament-withdrawals-lang"
relations allowlist (required if relation fields are used):
'relations' => [
\App\Models\Bank::class => ['name'],
],
| Component | Compatibility Notes |
|---|---|
| Package Version | v5.0.1 is the minimum acceptable version; earlier versions carry a known data-exposure defect. |
| Config | relations allowlist defaults to empty — relation fields render no options until populated. |
| Laravel | Confirm constraints in composer.json. |
| Filament | Confirm supported major version for the v5 line; pin accordingly. |
| PHP | 8.1+. |
| Databases | MySQL/PostgreSQL/SQLite via Laravel migrations. |
| Queues | Supports queued withdrawal processing if extended. |
| Caching | Filament caching optimizes UI; clear after config changes. |
withdrawal_requests.withdrawal_requests and withdrawal_methods before upgrades; config lives in version control.report(), Sentry); add alerting for relation fields rendering empty in production.status/created_at, paginate, lazy load. High volume requires queue-based processing and read replicas for reporting.::all()-style queries on large tables. Scope columns tightly and monitor query time on relation-backed fields.| Scenario | Impact | Mitigation |
|---|---|---|
| Unpatched pre-5.0.1 deployment | Password hashes and arbitrary table data rendered into payout forms; full credential compromise. | Patch immediately; run exposure assessment; rotate credentials if indicated. |
| Upgrade without allowlist config | Relation fields render empty; operators cannot select a payout destination. | Ship config in the same release; add a post-deploy smoke test on relation fields. |
| Over-permissive allowlist | Sensitive columns re-exposed through a sanctioned path. | Least-privilege allowlist; code review; never allowlist user/credential models. |
| Broad field-editor access | Non-privileged staff can alter which data forms query. | Restrict editor role; audit changes to withdrawal form definitions. |
| Database Lock Contention | Timeouts during bulk approvals. | Use transactions sparingly; implement retries. |
| Filament Cache Issues | Stale UI after config change. | php artisan cache:clear; use Filament cache tags. |
| Payment Gateway Failures | Withdrawals stuck in "pending". | Retry logic (retry()) or scheduled reconciliation. |
| CSRF/Session Attacks | Unauthorized withdrawal edits. | Filament auth/policies; standard Laravel protections. |
| Migration Conflicts | Schema conflicts on update. | Test in staging; use --force cautiously. |
How can I help you explore Laravel packages today?