Artisan Commands
raast-qr:install
Publishes the configuration file.
bash
php artisan raast-qr:installAlready installed? It says so and leaves your file alone. To overwrite it:
bash
php artisan raast-qr:install --forceYou'll be asked to confirm before anything is replaced.
raast-qr:generate
Generates a QR, or prints a payload, straight from the terminal.
bash
php artisan raast-qr:generate PK33ABCD0000000000000000 --amount=2500 --output=qr.pngArguments and Options
| Option | Description |
|---|---|
iban | Destination IBAN. Optional when one is configured. |
--amount= | Amount in PKR. Omit for a static code. |
--expiry= | YYYY-MM-DD or YYYY-MM-DDTHH:mm. |
--output= | Where to write. .png or .svg. |
--size= | Edge length in pixels. Defaults to 900. |
--margin= | Quiet zone in modules. Defaults to 4. |
--color= | Hex colour for the dark modules. |
--background= | Hex colour behind the modules. |
--label= | Caption printed under the code. |
--payload | Print only the payload string. |
Examples
Print the payload, useful when debugging what a bank app is reading:
bash
php artisan raast-qr:generate --amount=2500 --payloadA print-ready static counter card:
bash
php artisan raast-qr:generate \
--output=storage/app/counter.svg \
--size=1200 \
--color='#01411C' \
--label='Scan to pay'A one-off code for a customer:
bash
php artisan raast-qr:generate PK33ABCD0000000000000000 \
--amount=15000 \
--expiry=2026-12-31 \
--output=storage/app/invoice-882.pngRun it with no output path and it prints the payload plus a hint:
bash
php artisan raast-qr:generate --amount=2500Exit Codes
0 on success, 1 on a bad IBAN, amount or expiry. The error code is printed so scripts can branch on it:
bash
$ php artisan raast-qr:generate PK00ABCD0000000000000000
[INVALID_IBAN] Enter a valid 24-character Pakistani IBAN.In a Scheduled Task
php
Schedule::command('raast-qr:generate --output=storage/app/counter.svg --size=1200')
->monthly();Rarely necessary — a static code doesn't change — but useful if the account behind it might.
Made with ❤️ from Pakistan