- How do I install and use chengkangzai/filament-qrcode-scanner-html5 in a Filament form?
- Install it with Composer and attach the scanner action to the Filament input field you want to populate; registration is per field, so you can scope it to SKU, asset tag, or bin-location inputs only. Basic use needs no migrations, no published config, and no server-side setup. The component opens a modal, decodes the code in the browser, and writes the result into the Livewire form state.
- Which Laravel, Livewire, and Filament versions does this QR scanner package support?
- The package is built for Laravel applications using Livewire and Filament form components on PHP 8.x, and it runs entirely in the browser on the client side. The provided evaluation does not list exact Filament major versions, so confirm the supported Filament majors with the maintainer before adopting it. Pay particular attention to whether the isHidden() override used for disabled fields is stable across those versions.
- Does the QR code scanner require a native app or special hardware?
- No native app is required. It uses the device camera through HTML5 in the browser, decodes frames client-side, and pushes the scanned value into the Filament form field. A phone, tablet, or laptop with a camera and a modern evergreen browser is enough.
- Why does the camera scanner not open on my Laravel app?
- Camera access in browsers requires a secure context, so the scanner will only work on HTTPS origins or localhost. Check that the page is served over TLS and that the user has granted camera permission. This is an environment prerequisite rather than a package configuration step.
- Why did the scan button disappear on a disabled field after upgrading to 2.1.3?
- Version 2.1.3 changed the behavior so the scanner action hides itself when the Filament field is disabled. Before that release, scanning into a disabled field could silently write a value the form could not save. The new behavior is safer, but it can break scan-only workflows where the operator scans and never types.
- How do I keep the scanner action visible on a disabled Filament field?
- Use the hideWhenFieldDisabled() opt-out introduced with the change to restore the previous visibility behavior. This is useful for scan-only fields where the input is disabled but scanning is still the intended workflow. Treat this as a minor-version behavior change in spirit and add a test around any field that relies on it.
- Does a scanned value trigger Livewire validation and afterStateUpdated hooks?
- Yes. The package writes into the form state via $wire.set(), so server-side validation and reactive() or afterStateUpdated() chains still fire on the Livewire side. However, the value bypasses the input element, so keystroke-level input masks and maxLength enforcement are not applied. Explicitly verify any fields that rely on masking or length limits.
- Which browsers and devices support the HTML5 barcode decoding in this package?
- Decoding relies on the browser's barcode capability or a JavaScript fallback, so coverage depends on the decode path in use. Before rolling it out to warehouse handhelds, test Safari, Firefox, Chrome, and low-end Android devices with real codes. Ask the maintainer which browsers and devices have been validated.
- Can this package scan QR codes server-side or process uploaded barcode images?
- No. It is a UI-layer Filament form component that captures frames in the browser, decodes them client-side, and writes the result into the Livewire form. There is no server-side scanning, queue, external service dependency, or persistence of its own. For server-side decoding you need a different PHP or JavaScript package.
- How does the package handle Filament action visibility and my own hidden() conditions?
- The disabled-field guard is implemented by overriding isHidden() rather than calling ->hidden() directly, so a consumer's own ->hidden() condition is not clobbered. That is good for composability, but overriding a lifecycle method is a sharper edge than composing a flag. If you stack your own visibility conditions on the same action, add a regression test.