lulzshadowwalker / filament-qr
QR code components for Filament.
v0.1.0
2026-08-04 08:34 UTC
Requires
- php: ^8.2
- endroid/qr-code: ^6.0
- filament/filament: ^5.0
Requires (Dev)
- orchestra/testbench: ^10.0
- phpunit/phpunit: ^11.0
README
Filament QR components backed by endroid/qr-code.
Installation
Install the package via Composer:
composer require lulzshadowwalker/filament-qr
Register the plugin in your Filament panel provider:
use FilamentQr\FilamentQrPlugin; $panel->plugin(FilamentQrPlugin::make());
Basic Usage
use FilamentQr\Actions\QrAction; QrAction::make('qr') ->content(fn ($record) => route('menu.show',$record->slug));
You can also render components across your admin panel:
- Infolist:
QrEntry::make('qr')->content(...) - Table:
QrColumn::make('qr')->content(...)
Plugin Defaults
$panel->plugin( FilamentQrPlugin::make() ->size(240) ->theme('navy') ->correction('high'), );
Component-level settings will only override the specific options they set.
Themes
QrAction::make('qr') ->content('[https://example.com](https://example.com)') ->theme('forest') ->color('#052e16');
Available themes: classic, tapmenu, navy, forest, mocha, midnight, slate, and rose.
Customizable Mode
QrAction::make('qr') ->content(fn ($record) => route('menu.show',$record)) ->slideOver() ->customizable(['format', 'color', 'background', 'size', 'caption']);
- Call
customizable()without fields to expose every editor control to the user.
Saving and Restoring
QrAction::make('qr') ->content(fn ($record) => route('menu.show',$record)) ->fill(fn ($record) =>$record->qr_settings ?? []) ->onSave(fn ($result, $record) =>$record->update([ 'qr_uri' => $result->uri(), 'qr_settings' => $result->settings(), ]));
- The package does not write automatically to your database; handle persistence inside the
onSave()callback.
Hints & Warnings
Built-in warnings proactively flag potential issues:
- Unsafe logo sizes
- Low error correction settings
- Identical text and background colors
- Margins that are too small
- Unsupported EPS overlays
Set ->hints(false) to suppress warnings.
License
MIT