Skip to content

Installation Guide 🚀

Welcome to the installation guide for Raast QR! By following these simple steps, you'll have Raast QR up and running in your Laravel application in no time.

Requirements

  • PHP 8.3 or higher
  • Laravel 12.0 or 13.0
  • ext-gd or ext-imagick for PNG output

SVG needs nothing extra

SVG rendering is pure PHP. If your container has no image extension, use ->toSvg() and everything still works.

Step 1: Composer Magic ✨

First, let's kick things off with some Composer magic. Open your terminal and run the following command:

bash
composer require realrashid/raast-qr

This command will fetch and install Raast QR along with all its dependencies.

Step 2: Set Up the Foundation 🏗️

Next, we'll publish the Raast QR scaffolding.

bash
php artisan raast-qr:install

This publishes config/raast-qr.php, giving you full control over defaults like size, colours, error correction and the account the codes point at.

Step 3: Point It at an Account 🏦

Add your IBAN to .env:

dotenv
RAAST_QR_IBAN=PK33ABCD0000000000000000
RAAST_QR_ACCOUNT_TITLE="Your Business Name"

This step is optional

Leave the IBAN out entirely if money goes to different accounts in your application — a marketplace, for instance. You can pass an IBAN at every call site instead.

Step 4: Generate Your First QR! 💪

php
use RealRashid\RaastQr\Facades\RaastQr;

$qr = RaastQr::make()->amount('2500')->toDataUrl();

Or straight in a Blade view:

blade
<x-raast-qr amount="2500" size="320" />

Congratulations! Raast QR is now seamlessly integrated into your Laravel application. Scan the result with your own banking app to see it fill in the account and amount for you.

Delve into the documentation to uncover styling, logos, validation and the raw payload API.

Happy coding! 🚀


Made with ❤️ from Pakistan