Configuration
After running php artisan raast-qr:install, you'll find config/raast-qr.php in your application. Every option is documented inline; this page walks through what each one actually changes.
Default IBAN
'iban' => env('RAAST_QR_IBAN'),The Pakistani IBAN used whenever a QR is generated without one being passed explicitly. Handy when the whole application collects money into a single account.
// With 'iban' configured, this is enough:
RaastQr::make()->amount('2500')->toPng();Leave it null to require an IBAN at every call site, which is what you want for marketplaces and multi-tenant apps where money goes to different accounts.
Account Title
'account_title' => env('RAAST_QR_ACCOUNT_TITLE'),Purely for your own UI. The Raast P2P payload carries no name field, so the title a payer sees always comes from their own banking app.
Displaying your expected title next to the QR gives people something concrete to compare against before they confirm a transfer:
<x-raast-qr :amount="$order->total" />
<p>You should see <strong>{{ config('raast-qr.account_title') }}</strong> in your app.</p>Renderer Defaults
Everything under renderer is applied to every QR unless a builder call overrides it.
'renderer' => [
'size' => 900,
'margin' => 4,
'error_correction' => 'H',
'format' => 'png',
'foreground' => '#000000',
'background' => '#FFFFFF',
],| Option | Meaning |
|---|---|
size | Edge length in pixels. |
margin | Quiet zone in modules. Four is the scannable minimum. |
error_correction | L, M, Q or H. High is what lets a centre logo survive. |
format | Default output format, png or svg. |
foreground | Colour of the dark modules. |
background | Colour behind the modules. |
Contrast matters more than you'd think
Low-contrast colour pairs are the single most common cause of a QR that will not scan. Keep the dark colour genuinely dark, and test on a cheap phone in bad light before you print a thousand of them.
Centre Logo
'logo' => [
'path' => env('RAAST_QR_LOGO'),
'size' => env('RAAST_QR_LOGO_SIZE') ? (int) env('RAAST_QR_LOGO_SIZE') : null,
'punchout' => true,
],An absolute path to a PNG or SVG stamped in the middle of every code. Keep it small — anything past roughly a fifth of the code's width starts eating into the data even at high error correction.
See Adding a Logo for details.
Caption
'label' => [
'text' => env('RAAST_QR_LABEL'),
'size' => 16,
'font' => null,
],Printed underneath the code. Leave font as null to use the font bundled with the renderer, or point it at your own .ttf file.
See Adding a Label for details.
Environment Variables
Every option has an environment variable, so you can differ between local and production without touching the config file:
RAAST_QR_IBAN=PK33ABCD0000000000000000
RAAST_QR_ACCOUNT_TITLE="Your Business Name"
RAAST_QR_SIZE=900
RAAST_QR_MARGIN=4
RAAST_QR_ERROR_CORRECTION=H
RAAST_QR_FORMAT=png
RAAST_QR_FOREGROUND="#01411C"
RAAST_QR_BACKGROUND="#FFFFFF"
RAAST_QR_LOGO=/var/www/storage/app/logo.png
RAAST_QR_LOGO_SIZE=140
RAAST_QR_LABEL="Scan to pay"Made with ❤️ from Pakistan