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...
BarcodeInput extends TextInput), one Blade view, and a config file wrapping the html5-qrcode library. That makes the real decision "adopt, vendor, or reimplement," not "platform or not." Any in-house alternative carries the same underlying dependency; this package mostly saves the Filament-specific glue (asset registration, translations, placeholder behavior, modal wiring).TextInput. Adopt this only for the scenario where the device is the camera (field staff phones, tablets at a receiving dock, no dedicated hardware).formats to the 1–2 symbologies you actually use measurably improves scan speed and reliability. Treat "narrow the formats list" as a launch checklist item, not a nice-to-have.Consider it when:
^3.0).Look elsewhere when:
BarcodeDetector/ZXing/a 2D-capable library, not this.asset_js defaults to https://unpkg.com/[email protected]/..., a third-party runtime dependency and supply-chain consideration. Self-host the JS or budget for that change.TextInput, so you get Filament validation, but all domain validation is yours to write.For executives: This is a small, MIT-licensed UI component that lets operators scan a barcode with a phone or tablet camera directly into a form field, instead of typing the number. The business case is error and time reduction on manual code entry in inventory, receiving, and asset-tracking screens — a narrow, well-understood win rather than a platform bet. Cost is near zero (one Composer dependency, config-only setup), and because the whole component is ~1 class plus a view, we can take ownership of it outright if the upstream project stalls.
For engineering: It's a Filament v5 form component extending TextInput, wrapping html5-qrcode via CDN and restricted to eight 1D symbologies. Integration is composer require, publish config, drop BarcodeInput::make('barcode') into a schema. Three things to own explicitly: (1) pin the version and confirm the Filament major mapping — version tags and the docs table don't line up cleanly; (2) self-host or whitelist the html5-qrcode CDN URL and add it to CSP, since it's a third-party script loaded at runtime; (3) narrow the formats array to the symbologies we actually scan, and add our own checksum/GTIN validation on top. Treat the dependency as vendorable — the fork cost is trivial and it removes the only real adoption risk (a 4-star, single-maintainer project with no downstream users).
How can I help you explore Laravel packages today?