A powerful, modern QR code package designed exclusively for Filament v5 and Laravel 11 / 12.
Features:
- π· Interactive Camera Scanner: Real-time camera stream, rear-camera prioritization, torch/flashlight toggle, and image upload fallback with zero CDN latency.
- π Sequential Field Scanning: Step seamlessly through chained form fields (
->nextField('next_field')) or via theQrScanSequencesplit-screen container. - π« Hardware Scanner (Keyboard Wedge) Support: Native burst keystroke detection (<50ms) that absorbs trailing
Enterkeys to prevent premature form submissions. - π¦ Batch Collector (Repeaters & Lists): Continuous scanning mode with duplicate protection and sound/haptic confirmation for rapid inventory/trainee logging.
- π¨ Full QR Generator Suite: Generate SVG & PNG QR codes with captions/text overlays, logo embedding, and schema components for Forms, Tables, Infolists, and Actions.
- π Sensory Confirmation: Instant zero-latency synthesized Web Audio tone and mobile haptic feedback.
You can install the package via composer:
composer require mmuqiitf/filament-qr-codePublish the configuration file (optional):
php artisan vendor:publish --tag="filament-qr-code-config"Register the plugin in your Filament Panel Provider:
use Mmuqiitf\FilamentQrCode\FilamentQrCodePlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(FilamentQrCodePlugin::make());
}Add a QR scanner field to your form schema with camera modal and hardware scanner integration:
use Mmuqiitf\FilamentQrCode\Forms\Components\QrScanner;
use Mmuqiitf\FilamentQrCode\Enums\BarcodeFormat;
QrScanner::make('sku')
->label('Product SKU / Barcode')
->formats([
BarcodeFormat::QrCode,
BarcodeFormat::Code128,
BarcodeFormat::Code39,
BarcodeFormat::Ean13,
])
->sound(true)
->vibrate(true)
->hardwareScanner(enabled: true, burstThresholdMs: 50)
->scanFormat(fn ($rawValue) => strtoupper(trim($rawValue)))
->onScan(function ($scannedValue, $component) {
// Custom hook executed on scan
});For manufacturing stations and warehouse counters where operators shoot barcodes without touching the mouse:
use Mmuqiitf\FilamentQrCode\Forms\Components\QrWedgeListener;
QrWedgeListener::make([
'step',
'employee',
'document',
'equipment',
])
->autoFocusNext(true)
->sound(true);Add QrWedgeListener anywhere in your schema. It intercepts hardware scanner bursts across the entire page, populates the active or first empty field, and auto-advances focus.
Auto-focus the next field upon each scan:
QrScanner::make('batch_number')
->nextField('serial_number'),
QrScanner::make('serial_number')
->nextField('location_code'),
QrScanner::make('location_code'),Render a unified camera feed and field checklist:
use Mmuqiitf\FilamentQrCode\Forms\Components\QrScanSequence;
QrScanSequence::make([
'step' => 'Operation Step',
'employee' => 'Employee ID',
'document' => 'Document Number',
'equipment' => 'Equipment Code',
])
->fps(15)
->qrbox(250)
->sound(true)
->vibrate(true);use Mmuqiitf\FilamentQrCode\Forms\Components\QrCollector;
QrCollector::make('scanned_items')
->allowDuplicates(false)
->delayBetweenScans(1200);use Mmuqiitf\FilamentQrCode\Tables\Actions\QrCollectAction;
$table->headerActions([
QrCollectAction::make()
->allowDuplicates(false),
]);use Mmuqiitf\FilamentQrCode\Forms\Components\QrCodeDisplay;
QrCodeDisplay::make('qr')
->data(fn ($record) => $record?->uuid)
->size(200)
->color('#1e293b')
->caption('Scan to verify')
->downloadable();use Mmuqiitf\FilamentQrCode\Tables\Columns\QrColumn;
QrColumn::make('sku')
->thumbnailSize(48)
->modalSize(300)
->previewable()
->downloadable();use Mmuqiitf\FilamentQrCode\Infolists\Components\QrEntry;
QrEntry::make('verification_code')
->size(200)
->caption('Official Verification QR');use Mmuqiitf\FilamentQrCode\Tables\Actions\DownloadQrAction;
$table->actions([
DownloadQrAction::make()
->qrData(fn ($record) => $record->verification_url)
->qrFileName(fn ($record) => "qr-{$record->id}"),
]);use Mmuqiitf\FilamentQrCode\Facades\FilamentQrCode;
use Mmuqiitf\FilamentQrCode\Enums\QrFormat;
// Generate data URI
$dataUri = FilamentQrCode::make()
->format(QrFormat::Svg)
->size(300)
->generate('https://example.com')
->toDataUri();
// Generate PNG with Text Overlay & Download
return FilamentQrCode::make()
->withText('BATCH #1024', 16, '#000000')
->generate('BATCH-1024')
->download('batch-1024');composer testcomposer analysePlease see CHANGELOG.md for more information on what has changed recently.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.