---
title: "Artisan commands — QR for Laravel | Roundly"
description: "Render SVG files or inspect a code’s version, level, mask and bit budget from the command line with qr:make."
url: https://roundly-consulting.com/open-source/docs/qr-for-laravel/commands
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[QR for Laravel](https://roundly-consulting.com/open-source/docs/qr-for-laravel.md)

# Artisan commands

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

```bash
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 / option | Meaning |
| --- | --- |
| `data` | Text to encode; - reads STDIN. |
| `--ecc=` | Error correction level: L, M, Q or H. |
| `--min-version= / --max-version=` | Allowed version range (1–40); with only one given, the other keeps its configured bound (qr.versions.\*). |
| `--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; without --force the file is created exclusively, so an existing file — even one that appears mid-run — is never overwritten. |
| `--force` | Overwrite the --output file. |
| `--info` | Print 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](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## 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.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/qr-for-laravel.md)
