bacon/bacon-qr-code
BaconQrCode is a pure-PHP QR code generator ported from ZXing's encoder. It renders QR codes to PNG, SVG, EPS or GD images with customizable size, margin, colors, gradients and eye styles, backed by a fast Reed-Solomon codec for quick output. Encoder only.
bacon/bacon-qr-code is a PHP port of the ZXing encoder, MIT-licensed and actively maintained — a credible "buy" as a dependency rather than a service.otpauth:// URIs, signed deep links) never leave our infrastructure. This is a decision-grade argument for any flow touching PII or auth.SvgImageBackEnd for PDF invoices, labels, and print collateral; GDLibRenderer for fast web/email thumbnails; ImagickImageBackEnd only where raster control matters. That's a product decision about where QR codes appear, made cheaply.Adopt the underlying package when:
QrCodeGenerator service behind an interface) rather than a framework-native API.Look elsewhere when:
endroid/qr-code and simplesoftwareio/simple-qrcode both sit on top of Bacon and give you that DX. For a Laravel app, the realistic recommendation is to depend on one of those and treat Bacon as the transitive engine, unless you have a specific reason to go one level down.ext-gd, ext-imagick, or ext-xmlwriter across target environments.Flag as a real risk: the documented Imagick rasterizer bug causing stray white pixels inside filled modules. The maintainers state it cannot be reliably worked around. Do not standardize on ImagickImageBackEnd for anything scanned at margin 0, printed, or rendered small. Standardize on SVG (with GD as the raster fallback) and write that into the technical decision record.
For executives: This is a small, MIT-licensed, actively maintained PHP library that generates QR codes on our own servers with zero per-scan cost and zero data leaving our infrastructure. It removes a third-party dependency from any flow carrying customer data, and it covers every output we're likely to need — web images, email, SVG for print, branded multi-tenant styling — without new headcount. Maintenance load is low: the project ships semantic releases, changelogs, and CI with coverage.
For engineering: Encoder-only port of ZXing with a clean renderer abstraction (Imagick / SVG / EPS / GD). PHP 8.1+, no Laravel coupling — we wrap it behind a single internal service so it's swappable. Two known caveats: no decoder, and an ImageMagick rasterizer bug that produces stray white pixels, so we standardize on the SVG backend and use GD where we need raster. Requires ext-xmlwriter or ext-gd.
Recommendation: Adopt, but consume it through a wrapper — realistically via endroid/qr-code for Laravel ergonomics — and make SVG the default renderer. Low cost, low lock-in, and it converts a vendor dependency into an owned, auditable capability.
How can I help you explore Laravel packages today?