NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages
QR for Laravel

Artisan commands

qr:make renders any text as an SVG (with the XML declaration) to STDOUT or a file, or prints the encoding details:

php artisan qr:make "https://example.com" --size=240 --ecc=H --output=qr.svg
echo "piped text" | php artisan qr:make - --info
php artisan qr:make "hello" --min-version=2 --max-version=5 --mask=3 --margin=2 --fg=#111 --bg=transparent --output=qr.svg --force
Argument / optionMeaning
dataText to encode; - reads STDIN.
--ecc=Error correction level: L, M, Q or H.
--min-version= / --max-version=Allowed version range (1–40).
--mask=Force a mask (0–7).
--size= / --margin=Width/height in pixels and the quiet zone in modules.
--fg= / --bg=Foreground and background colour.
--output=Write the SVG to this path (refuses to overwrite without --force).
--forceOverwrite the --output file.
--infoPrint version, level (boosted?), mask, segments, bit budget, ECI and mask penalties instead of the SVG.

Invalid input fails with the exception message and a non-zero exit code. Called from code through Artisan::call(), the numeric options (--min-version, --max-version, --mask, --size, --margin) accept PHP integers as well as strings; any other value fails as “must be an integer” instead of being ignored. php artisan about lists the package’s effective settings — see Configuration.

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.