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 Barcode Field Laravel Package

jeffersongoncalves/filament-barcode-field

Add barcode input to Filament admin panels with a dedicated, scanner-friendly form field for Laravel. It supports validation and clean integration, helping streamline product, inventory, SKU, asset, and order data capture workflows. Easy to configure and fits naturally into existing Filament resourc...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What it actually is. A single Filament form component, not a panel plugin. BarcodeInput extends Filament\Forms\Components\TextInput, swaps in a custom Blade view, and ships a service provider that registers config, translations, views, and CSS via FilamentAsset::register(). There are two meaningful PHP classes. That is the entire surface area, and it is the most important fact in this assessment: the integration risk is low, the vendor risk is high, and the two are separable.

Architecture fit. Good for teams already on Filament who want camera-based scanning on a form field with near-zero wiring. The TextInput inheritance means every existing modifier (required(), maxLength(), rules(), reactive(), ->live()) still works, and downstream code that type-hints TextInput or reads $state is unaffected. The package does not touch persistence, routing, policies, or queues — there is nothing to reconcile with your domain model.

The limitation worth surfacing to stakeholders: this is an input affordance, not a barcode system. It returns a raw string. It does not return the symbology that was decoded, does not validate check digits (EAN-13/UPC-A mod-10, Code 128 structure), does not normalize GTIN-14 padding, and does not distinguish a 12-digit UPC-E from a truncated EAN-13. Any data-quality guarantee has to be built by you, server-side, behind the rules() you attach to the field.

The value proposition is narrower than it sounds. USB/Bluetooth keyboard-wedge scanners — the standard in warehouse, retail back-office, and clinic check-in — already work with a plain TextInput because they emulate keystrokes. The package's incremental value is specifically camera-based scanning on a device without a hardware scanner, i.e. a phone or tablet browser. If your actual requirement is "scan with the handheld gun we already bought," adopt nothing; you already have it. If the requirement is "our field techs and store associates should scan with the phone in their pocket," this is a fit.

Hard technical constraints to accept up front:

  • 1D only. EAN-13/8, UPC-A/E, Code 128, Code 39, ITF, Codabar. No QR, no Data Matrix, no PDF417. GS1 DataMatrix (pharma, medical devices, many supply-chain labels) and QR-based workflows are out of scope.
  • CDN-loaded JavaScript. [email protected] is pulled from unpkg.com at runtime via config. No SRI, no bundling. That is a third-party availability dependency on every form render and a likely blocker under a strict script-src CSP. Self-hosting the pinned file is a one-line config change and should be treated as mandatory, not optional.
  • HTTPS + explicit camera permission. getUserMedia will not run otherwise. This means no meaningful testing on plain-HTTP dev environments and no scanning in kiosk/locked-down browser profiles without a permissions policy.
  • Global, not per-field, configuration. formats, modal width, and reader dimensions live in one published config file. Two fields on the same form needing different symbology sets cannot be expressed without overriding views. For most apps this is fine; for a multi-tenant or multi-domain product it is a design constraint you inherit.

Version risk is the loudest signal in the source material. The compatibility table maps 1.x→Filament 3, 2.x→Filament 4, 3.x→Filament 5, and the skill documentation instructs composer require ...:"^3.0" — yet the published release record shows 1.1.0 as latest, dated 2026-09-23, and the repository description says it extends Filament v5. Three artifacts, three different stories about which version pairs with Filament 5. That is not a fatal flaw in a two-class package, but it is exactly the kind of ambiguity that consumes a sprint day during onboarding. Resolve it before committing.

Evidence base. 4 stars, 0 dependents, a single maintainer, dependabot-driven dependency bumps, and a recent i18n contribution of 17 locales. No test suite is documented. The release notes are dominated by funding links and CI housekeeping rather than feature or fix content — a signal that active product development is thin. The counterweight is MIT licensing and a trivially small codebase: the fork cost is measured in hours, not weeks.

Key questions to put to the maintainer or resolve internally:

  1. Which tagged release is the supported Filament 5 target, and is 3.x published to Packagist?
  2. Is there a test suite, and does it cover the scanner modal's JS interop or only the PHP component?
  3. Is self-hosting the html5-qrcode asset a supported configuration, and is the pinned version intentionally frozen at 2.3.8?
  4. What is the maintainer's stated support window per Filament major?
  5. Is there any intent to expose the decoded symbology or a per-field formats() API?

Integration Approach

Stack fit. Requires Laravel + Filament 5 + Livewire + Tailwind, and a Blade view that renders correctly inside a Filament form schema. If you are on Filament 3 or 4, use the corresponding 1.x/2.x line — do not attempt to force 3.x onto an older core. If you are not on Filament, this package is irrelevant to you entirely.

Migration path. Effectively a no-op. BarcodeInput::make('barcode') is a drop-in for TextInput::make('barcode') with identical state semantics, identical validation hooks, and identical column/file handling. There is no schema change, no data migration, no backfill. The blast radius of a rollback is the same one line.

Recommended adoption shape — insulate, don't inline. Do not reference the vendor namespace directly across dozens of resources. Create a thin local wrapper:

App\Filament\Forms\Components\BarcodeField extends BarcodeInput

and reference only that. This gives you a single swap point if the package is abandoned, lets you add per-field symbology restrictions later without touching call sites, and lets you inject your own check-digit validation rule in setUp().

Sequencing (suggested 3–4 weeks of elapsed time, low effort):

  1. Week 0 — spike. Install on a branch, publish config and translations, verify the Filament 5 tag actually resolves. Scan three real barcodes on a real phone over HTTPS. If this step takes more than a day, the package is not the problem — your CSP or TLS setup is.
  2. Week 1 — hardening. Self-host the html5-qrcode asset, add it to your CSP script-src, pin the version in your build pipeline, and restrict formats to exactly the symbologies you accept (fewer formats = faster and more reliable decode).
  3. Week 1 — validation. Add server-side rules: format-specific regex, check-digit validation for EAN/UPC, and a uniqueness/lookup check against your catalog. Reject anything the client accepts but the server cannot classify. This is the actual deliverable; the scanner is cosmetic without it.
  4. Week 2 — pilot. Ship on one resource behind a feature flag, with the plain TextInput still reachable as the manual-entry path. Capture how often users open the scanner and bail.
  5. Week 3–4 — rollout. Expand, add the wrapper class, publish translations if you support non-English locales. Publish the config only if you need to change defaults.

Compatibility caveats. The component calls parent::setUp() and stores the icon in extraAttributes, and it imports Filament\Support\Enums\Width for modal sizing. Both are internal-ish contracts that can shift across Filament majors. Plan to re-verify visually after every Filament upgrade — this is a UI regression test, not a unit test.

Do not use this for 2D symbologies, for unattended kiosk scanning, for offline/air-gapped deployments, or as the sole input path for any workflow where a failed scan blocks the user.

Operational Impact

Maintenance burden: low, but not zero. Two classes and one Blade view. The things that will actually page you are outside the package: the CDN, the CSP, and the browser's camera permission model. Budget roughly a day per Filament major upgrade to re-verify rendering and modal behavior, plus whatever your dependency policy demands for the vendored JS.

Support and vendor risk: the dominant concern. One maintainer, four stars, zero dependents, and release notes weighted toward sponsor links. This is a hobby-scale project. Treat it as such: assume no SLA, no security response process, and no guarantee of a Filament 6 release. Mitigate by (a) vendoring the JS, (b) wrapping the component locally, (c) keeping the fork path warm. Because the code is MIT and tiny, an internal fork is a realistic contingency and should be written into the risk register as the explicit fallback, not a vague worry.

Scaling characteristics. There is no server-side component — no routes, no jobs, no migrations, no database writes. Server load impact is zero. The only scaling dimension is the asset: a CDN fetch per form render where the scanner is used, cached by the browser after first load. Self-hosting moves that to your own static delivery and removes an external egress dependency; either way, it is not a capacity concern. The camera decode runs on the client and will be slower on low-end Android devices; scanner.fps (default 10) and the scan box dimensions are the tuning knobs, and a 1D barcode wants a wide box — the defaults (300x150 scan window, 600x600 reader) are reasonable but should be validated on your actual device fleet.

Failure modes, ranked by likelihood:

  1. Camera permission denied or dismissed. Silent from the user's perspective — the modal just doesn't produce a value. Always keep manual entry visible and reachable; the package gives you that for free because it is a TextInput.
  2. CDN blocked or CSP violation. No scanner, no error your PHP logs will ever see. Self-hosting plus a documented CSP entry eliminates this class entirely.
  3. Symbology not enabled or box aspect ratio wrong. Users report "it won't scan" and you get a support ticket instead of a log line.
  4. Garbage accepted. Scanner misreads, or a valid barcode from the wrong format family, lands in your database because nothing validated it. This is the one failure mode with real business consequence and the one you fully control.
  5. Filament major upgrade breaks the view. Visible immediately in QA.

Observability is the real gap. The package emits nothing. You cannot tell how many users attempt a scan, how many succeed, or which symbologies fail. Instrument it yourself — a client-side event on scan success/failure/manual-entry-fallback, written to your existing analytics — before you roll out broadly. Otherwise you will be making adoption decisions on anecdote.

Ramp-up. An hour for a Filament-fluent developer to read the two classes and the config; the skill documentation and the README cover installation, configuration, and the four common troubleshooting cases. The non-obvious parts — check-digit validation, format normalization, CSP configuration, device testing — are your team's work, not the package's, and should be scoped as such. Total realistic effort for a production-quality integration: 3–5 engineer-days, of which perhaps two hours are the package.

Recommendation. Adopt, with conditions: pin the version, self-host the JS, wrap the component, and own the validation. The package itself is a small, low-risk convenience; the risk sits entirely with its bus factor and your own discipline around data quality.

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.
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support