- How do I install and set up filament-qr-code in a Laravel Filament panel?
- Install the package with Composer using mmuqiitf/filament-qr-code, then run php artisan filament:assets so the scanner JavaScript and CSS are published. Add the QrScanner field to your Filament form, resource, table, or custom component as needed. The asset step is required after updates because the scanner frontend must match the server contract.
- Which Laravel and Filament versions does mmuqiitf/filament-qr-code support?
- The package is built for Laravel applications that already use Filament and Livewire, so it fits standard Filament admin panels. Exact supported version ranges should be confirmed in the package composer constraints and changelog before upgrading. Because the 0.4 line is pre-1.0, pin an exact version and review each release rather than assuming minor versions are stable.
- How do I add a QR code scanner field to a Filament form?
- Add the package QrScanner field to a Filament form schema, resource form, or custom Livewire component. With no server checks configured, it behaves as a client-side capture widget with a single success beep and no extra Livewire requests. You can also use it in tables or custom components depending on how the field is composed.
- How do server-side QR scan checks work in v0.4.0?
- Each live scan triggers a Livewire call to handleScan through Filament callSchemaComponentMethod. The package runs ordered checks: Laravel validation rules first, then model lookup, then closures, and returns pass or fail while firing callbacks and events. The same checks re-run on form submit through ScanChecksRule, so client-side approval is not the only authority, and upload scans rely on that submit-time validation.
- Do I need to run php artisan filament:assets after updating filament-qr-code?
- Yes. Version 0.4.0 changed the scanner JavaScript and CSS, so you must run php artisan filament:assets and clear Filament and Livewire caches during deployment. Treat asset publishing as a real deploy requirement, because stale scanner JavaScript will not match the new server contract or feedback styles. Confirm browser cache busting in your deployment pipeline.
- Can I scope QR code lookups by tenant or authorization in Filament?
- Yes, but it is your responsibility as the integrator. Use lookup with modifyQueryUsing to add tenant scoping, policy checks, or additional Eloquent constraints. Also review translated record_not_found messages, because lookup results can reveal whether a record exists unless scoping and messaging are handled carefully.
- What happens if the Livewire handleScan request times out during a QR scan?
- The package adds a Livewire round trip per live scan, so network or database slowness directly affects the scanning workflow and the camera pauses while checks run. Test timeout and failure behavior in your panel, including whether the modal retries, unpauses, or gets stuck. Set a realistic p95 latency budget for handleScan under production database load.
- Why are valid repeat QR scans being ignored by filament-qr-code?
- The cooldown feature suppresses duplicate scans within a configured window, so an operator may be unable to rescan a corrected code until the cooldown expires. ClearOnReject combined with cooldown can also create a wait path that blocks legitimate retries. Tune these settings against real operator workflows, because silent duplicate suppression can drop valid scans.
- How do I customize beep, vibrate, and flash feedback for QR scans?
- Configure qr-code.feedback.success and qr-code.feedback.error globally, and use per-field methods such as beep, vibrate, and flash to tune device behavior. This lets you adjust feedback without forking the package. Keep feedback consistent with whether a scan passed server-side checks so operators are not misled.
- Is filament-qr-code safe for production while it is pre-1.0?
- It can be used in production Filament panels, but the 0.4 line is pre-1.0, so pin exact versions and review each changelog before upgrading. The main risks are runtime behavior rather than API breakage: per-scan Livewire latency, cooldown dropping legitimate repeat scans, lookup existence leaks, and audit events storing sensitive payloads. Plan for asset publishing, authorization scoping, indexed lookup columns, and a clear PII and retention policy when audit is enabled.