Skip to main content
Laravel QR Code gives you a clean, fluent API for generating QR codes in any Laravel 12+ application. Whether you need a one-liner in a Blade view, a controller action that encodes a vCard, or a build-script that writes PNGs to disk, the package covers all three with zero boilerplate.

Fluent Facade

Chain methods on QrCode:: to set size, color, format, and error correction — then call generate() to get the result.

Blade Component

Drop <x-qr-code data="…" /> into any template and get an accessible, inline SVG or base64 image with no extra PHP.

Artisan CLI

Run php artisan qr:generate for interactive generation or pass flags for scripted, non-interactive output.

Rich Data Types

Built-in helpers for URLs, Email, SMS, WiFi, vCard, MeCard, Geo, WhatsApp, Telegram, Calendar Events, BTC, and Ethereum.

Multiple Formats

Output SVG (default, no extensions needed), PNG, WebP, or EPS. PNG and WebP use Imagick when available, GD otherwise.

Deep Customization

Control colors (RGB, RGBA, CMYK, grayscale), gradients, dot/round/square module styles, eye styles, image merging, and error correction levels.

Auto-Discovery

The service provider and QrCode facade alias are registered automatically — no config/app.php edits required.

Macros

Register your own named data types with Laravel’s Macroable trait and call them as first-class facade methods.

Requirements

DependencyRequired version
PHP8.2 or higher
Laravel12.0 or higher
ext-imagickOptional — recommended for PNG/WebP performance
ext-gdOptional — automatic fallback for PNG/WebP when Imagick is absent
SVG and EPS generation require no PHP image extensions. ext-imagick or ext-gd is only needed when you output PNG or WebP.

Version guidance

Package versionPHPLaravelStatus
v3.x (current)8.2+12+Active development
v2.x8.2+11+Maintenance only
v1.x8.1+10Maintenance only
Install linkxtr/laravel-qrcode:^3.0 to get the latest v3.x release with semantic versioning protection. If your project runs Laravel 10, use ^1.0 instead.
Upgrading from v2.x? Read the Upgrade Guide before updating — the v3 API is a breaking change from the v2 interface.

Next steps

Ready to add QR codes to your app? Head to the Quickstart to generate your first code in under five minutes.