Skip to main content
Laravel QR Code is a modern QR code generation package for Laravel 12+ and PHP 8.2+. This documentation covers everything from installation and configuration to advanced usage with the QrCode facade, Blade component, Artisan CLI, and built-in data types like WiFi, vCard, and more.

Introduction

Learn what Laravel QR Code offers and how it fits into your Laravel application.

Quickstart

Install the package and generate your first QR code in under five minutes.

Usage Guide

Explore the fluent QrCode facade API and its full range of chainable options.

Data Types

Encode WiFi credentials, vCards, geo coordinates, crypto addresses, and more.

Get Started in Three Steps

1

Install the package

Require the package via Composer and let Laravel auto-discover the service provider.
composer require linkxtr/laravel-qrcode
2

Publish the config file

Publish the configuration file to customise default format, size, and error correction level.
php artisan vendor:publish --tag=qrcode-config
3

Generate your first QR code

Use the facade, the Blade component, or the Artisan command — whichever fits your workflow.
<x-qr-code value="https://example.com" size="300" />
Laravel QR Code requires PHP 8.2+ and Laravel 12+. Make sure your environment meets these requirements before installing.

Explore further

Configuration

Customise default output format, image size, margin, and error correction level.

Blade Component

Drop <x-qr-code> directly into your Blade views with zero extra PHP.

Artisan CLI

Generate and save QR code files from the command line with php artisan qr:generate.

Advanced Macros

Extend the QrCode facade with your own reusable macros via Laravel’s macro system.
All output formats — SVG, PNG, WebP, and EPS — are available through the same fluent API. Chain .format('png') before .generate() to switch formats on the fly.