bacon/bacon-qr-code
PHP QR code generator ported from ZXing (encoder only). Render to PNG via Imagick, or output SVG/EPS; includes a separate GDLib renderer. Simple Writer API to generate QR codes to files or strings.
Feature Development:
Roadmap Prioritization:
Build vs. Buy:
Use Cases:
imagick or xmlwriter extensions (GDLibRenderer is limited to square codes).*"BaconQrCode is a high-performance, open-source PHP library that lets us generate custom-branded, multi-format QR codes without relying on external APIs. This reduces latency, eliminates third-party costs, and enables seamless integration into our existing Laravel stack for use cases like:
- Customer engagement: Scannable product tags or loyalty program rewards.
- Operational efficiency: Automated ticketing or access control systems.
- Global reach: Support for non-Latin text (e.g., Chinese, Arabic) for international markets.
The package is actively maintained, PHP-native, and offers flexibility (PNG/SVG/EPS output, gradients, transparency) to align with our design system. By adopting this, we avoid vendor lock-in and can scale QR functionality internally without ongoing API fees."*
*"BaconQrCode is a port of ZXing’s QR encoder, optimized for PHP with these key advantages:
- Performance: Uses Phil Karn’s Reed-Solomon implementation for faster encoding than pure-PHP alternatives.
- Flexibility:
- Multiple renderers: Imagick (high-quality PNG), SVG (scalable vector), or GDLib (lightweight, square-only).
- Custom styling: Gradients, transparent backgrounds, and alpha channels for brand consistency.
- Localization: Built-in support for Kanji, emoji, and UTF-8 text.
- Integration-friendly:
- Works seamlessly with Laravel’s service container (dependency injection).
- Outputs to files or streams (e.g., for API responses or storage).
- Reliability: Actively maintained (last release: 2026), with a BSD-2-Clause license (no legal risks).
Trade-offs:
- No decoder (yet); pair with JS libraries for scanning.
- Requires PHP 8.1+ and extensions like
imagickorxmlwriterfor full features.Proposal: Use this for internal tools first (e.g., employee badges), then expand to customer-facing features. The GDLibRenderer can serve as a fallback for environments without Imagick."*
*"BaconQrCode lets us control the look and feel of QR codes to match our brand:
- Gradients/colors: Replace the default black-and-white design with custom palettes.
- Transparency: Overlay QR codes on images or use them in layered designs.
- SVG output: Generate scalable vector graphics for print or high-DPI displays.
- No artifacts: The SVG renderer avoids the white-pixel issues seen in Imagick.
Example use cases:
- Marketing: QR codes embedded in print ads or packaging.
- Apps: Scannable UI elements with transparent backgrounds.
- Accessibility: High-contrast colors for better visibility."*
How can I help you explore Laravel packages today?