Native QR codes for Laravel: an ISO/IEC 18004 encoder with optimal segmentation, one optimised SVG renderer, and typed payloads for otpauth 2FA, EPC SEPA transfers and PAY by square — zero third-party dependencies.
roundly-consulting/qr-for-laravel is a Laravel package for native qr codes for laravel: an iso/iec 18004 encoder with optimal segmentation, one optimised svg renderer, and typed payloads for otpauth 2fa, epc sepa transfers and pay by square — zero third-party dependencies..
It currently has 0 GitHub stars and 203 downloads on Packagist (latest version 1.1.2).
Install it with composer require roundly-consulting/qr-for-laravel.
Discover more Laravel packages by roundly-consulting
or browse all Laravel packages to compare alternatives.
Last updated
Native QR codes for Laravel: an ISO/IEC 18004 encoder, one optimised SVG renderer, and typed payloads for 2FA setup codes, links, contacts, Wi-Fi, SEPA credit transfers (EPC069-12) and Slovak PAY by square payments. No third-party runtime libraries.
Requires PHP 8.4 (ext-mbstring, ext-bcmath) and Laravel 12 or 13.
composer require roundly-consulting/qr-for-laravel
Build a code fluently and render it as SVG — or return the builder from a route:
use RoundlyConsulting\Qr\Facades\Qr;
$svg = Qr::url('https://example.com/menu/12')
->size(240)
->errorCorrection('Q')
->title('Scan to order')
->svg(); // Svg value object, Htmlable
$svg->toString(); // the <svg> markup
Qr::url('https://example.com')->toDataUri(); // data:image/svg+xml;charset=utf-8,…
Route::get('/tables/{table}/qr', fn (Table $table) => Qr::url(route('menu', $table))); // image/svg+xml
Payments and 2FA enrolment codes are typed payloads too:
use RoundlyConsulting\Money\Money;
use RoundlyConsulting\Qr\Payloads\Payments\Epc\EpcPayment;
$payment = new EpcPayment(
name: 'VetClinic s.r.o.',
iban: 'SK96 1100 0000 0029 1859 9669',
amount: Money::ofMinor(12550, 'EUR'),
reference: 'RF18539007547034',
);
Qr::epc($payment)->svg();
Qr::otpauth($setup->provisioningUri)->svg(); // never cached, served with no-store
Or drop one into a view:
<x-qr-code :data="$payment" :size="200" title="Scan to pay" />
The full documentation — configuration, every feature and its API, and testing — lives on our website: roundly-consulting.com/open-source/docs/qr-for-laravel
Release notes are in CHANGELOG.md. To contribute, see the contributing guide.
This package is free and open source, built and maintained by Roundly Consulting. If it saves you time, please consider supporting our open-source work — a one-time donation, a monthly pledge on Patreon or a crypto donation helps fund maintenance, new features and new packages.
The MIT License (MIT). See LICENSE.md.