Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Sql Field Laravel Package

mrpowerup/filament-sql-field

A Filament form field that adds a SQL query editor with syntax highlighting and validation, letting admins write and run raw SQL directly inside your admin panel. Note: filenames and code strings are omitted from this summary.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. This is a UI accelerator, not a SQL platform. mrpowerup/filament-sql-field is a Filament form field that wraps CodeMirror 5 to provide a syntax-highlighted, line-numbered SQL input with keyword/table/column autocomplete, light/dark theming matching the panel, read-only/disabled states, and standard Filament form lifecycle and validation hooks. It sits strictly in the presentation tier of an internal admin surface: saved-query libraries, ad-hoc ops/support consoles, report and metric authoring, data-quality check configuration, ETL/transformation step definitions, and SQL-backed alert rules. It provides no execution, no dialect awareness, no parameter binding, no authorization, no auditing, and no query safety. Treat it as "the text box" — every security-relevant control is a separate deliverable owned by the integrating team.

Integration feasibility. Low engineering cost for a team already on Filament: Composer install, register the field, drop it into a form schema. Release 2.0.2 explicitly claims Filament 5 support, which removes the most common near-term compatibility objection for teams standardizing on the current Filament major. The real effort is server-side and unchanged by the package: authenticating the actor, authorizing SQL actions, validating statements, executing against an approved connection, enforcing statement timeouts and row caps, tenant/row scoping, and logging every execution. A TPM should sequence the field as the last deliverable in the feature, gated behind that query service.

Technical risk. Product risk is high and sits entirely outside the package: raw SQL in an admin panel enables destructive statements, data exfiltration, runaway queries, lock contention on production primaries, and cross-tenant leakage if scoping is weak. Community risk is moderate-to-high — 18 stars, zero dependents, a single maintainer, no vendor, no SLA. The February 2026 2.0.2 release is a genuine positive maintenance signal but does not change the structural bus-factor picture. CodeMirror 5 is a legacy major version, so an eventual editor migration (CodeMirror 6 or Monaco) should be assumed and kept cheap behind the same form-field contract. Accessibility and mobile/browser-support posture of the embedded editor are unverified. Release notes are thin ("Support Filament 5," "Improving existing resources"), which is not sufficient rigor to treat as a documented upgrade path — read the diff before pinning.

Key questions.

  • Does the field only edit SQL, or does it execute anything? (Assumed: edit only — verify.)
  • Does 2.0.2 support both Filament 4 and Filament 5, or only Filament 5? Were 1.x-era majors dropped in the major bump?
  • Were Composer constraints tightened or dropped in the 1.x → 2.x bump, and are there breaking changes to the field's fluent API?
  • What specifically changed under "improving existing resources" — do published views or assets need republication, and would that collide with local overrides?
  • Which Laravel, PHP, Livewire, and Alpine versions are supported?
  • How are CodeMirror assets registered — published vendor assets or Vite — and do they pass our CSP?
  • Is there validation beyond Filament's standard rules (dialect selection, parameter binding, statement-type restriction)? How are stored queries rendered — is output escaped?
  • Is there test coverage, and what is the maintainer's stated plan for CodeMirror 5 longevity?
  • Which audit, permission, and query-limit controls must we build before this ships anywhere?

Integration Approach

Stack fit. Strong for Laravel + Filament admin panels, and materially better for teams on Filament 5 given the 2.0.2 claim. The intended composition is: SqlField as the editor inside a custom Filament page or resource form, plus a run action, a results table, saved-query persistence, and export controls. Pair it by default with a read-only database connection (replica), role-gated visibility, an approval flow for any write-capable path, statement timeouts, row caps, and audit logging on every execution. If the org is on an earlier Filament major, confirm support before standardizing rather than assuming it.

Migration path. Start non-production. Install and pin 2.0.2, render the field inside an actual Filament form — including inside modals and actions, where asset and lifecycle issues tend to surface — verify assets load under the real deployment model and CSP, then build a thin query service (statement validation, allow/deny lists, timeout and row-limit enforcement, connection selection, execution logging) as a separate, editor-agnostic layer. Pilot with one internal team against a read replica. Because the query service owns the contract, replacing the editor later with Monaco or CodeMirror 6 is a contained, low-risk refactor rather than a rewrite. Treat the 2.0.2 upgrade as a compatibility change to test, not as a substitute for the gateway.

Compatibility. Filament 5 support is explicitly claimed; verify the exact matrix rather than trusting the release note — PHP/Laravel constraints, Livewire version, Alpine compatibility, asset pipeline, CSP directives, and browser support. Confirm whether Filament 4 remains supported and whether existing 1.x installations can upgrade without code changes (a major bump often signals a dropped-version policy). Check that CodeMirror 5 does not collide with editor or frontend dependencies already in the admin bundle, and that read-only and disabled states behave correctly under Filament form validation and inside repeater/relationship contexts.

Sequencing.

  1. Define use cases and the security/compliance boundary — who may author SQL, against which connection, with what limits, with what audit trail.
  2. Stand up the read replica / restricted database role and the query execution service with timeouts, row caps, and logging. This is the critical-path work.
  3. Build the Filament page/resource shell — permissions, saved-query model, run action, results view, export controls.
  4. Spike SqlField 2.0.2 in a throwaway branch to validate compatibility, asset registration under Vite/CSP, and behavior in modals. Timebox it; escalate the key questions above if the diff is unclear.
  5. Integrate behind a feature flag, gated to an internal pilot group, on non-production data first.
  6. Harden, then widen access. Define the CodeMirror 5 exit criterion up front so the editor swap is scheduled rather than reactive.

Operational Impact

Maintenance. The component surface is small and MIT-licensed, so the downside case is vendoring or forking — a governance decision, not a technical emergency. With one maintainer and zero dependents there is no community backstop, so pin the exact version, commit the lockfile, and keep a written fork plan. Budget a small recurring allowance to track upstream releases and to read the diff on each major bump. The standing liability is CodeMirror 5: assume an editor migration is on the roadmap and size it as a bounded front-end task behind the existing form contract.

Support. No SLA, no vendor relationship, no support channel beyond GitHub issues. Tier-1 support questions will not be about the editor — they will be about query results, permissions, and timeouts, which are ours to own. Establish an internal owner (likely the platform/admin-tooling team) and an escalation path to whoever owns the query service. Document explicitly that the package renders text and does not execute, validate, or sandbox SQL, so support staff do not attribute execution failures to it.

Scaling. The field itself is a client-side editor and does not scale-dimension the system. The scaling risk is downstream and entirely ours: concurrent ad-hoc queries against the same database, unbounded result sets, long-running scans, and lock contention on shared tables. Enforce statement timeouts, row caps, and per-user concurrency limits in the query service, and point the default connection at a read replica. If usage grows, the constraint will be database capacity and the audit log's write volume — not the editor.

Failure modes.

  • Security — a destructive or exfiltrating statement executed with over-broad credentials; cross-tenant data returned. Mitigation: read-only role, allow-listing, mandatory tenant scoping, approval flow for write paths.
  • Availability — a runaway query degrades the primary database and takes down unrelated features. Mitigation: replica default, timeouts, row caps, kill-switch.
  • Compliance — no audit trail of who ran what. Mitigation: log every execution before the feature ships.
  • Asset/CSP — CodeMirror assets blocked by CSP or broken by the Vite build, degrading the field to an unstyled textarea. Mitigation: validate in the real deployment model during the spike.
  • Vendor abandonment — upstream goes stale. Mitigation: pinned version, vendored copy, small fork surface.
  • Editor drift — a future Filament/Livewire upgrade breaks the field. Mitigation: keep the query service editor-agnostic so the swap is contained.

Ramp-up. Engineering ramp is a day or two for anyone who knows Filament forms; there is essentially no learning curve on the package itself. The organizational ramp is where the time goes: reviewers of the security boundary (read-only credentials, tenant scoping, audit retention), legal/compliance sign-off on raw SQL access to production-derived data, and the internal comms that set expectations that this is an admin-only tool for technical users — not a self-serve analytics product for customers. Plan for the governance conversation to run in parallel with the engineering spike so the field is not sitting idle waiting on approvals.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core