splitbrain/php-qrcode

Minimalist SVG based QRCode Generator

0.1 2022-03-10 16:01 UTC

This package is auto-updated.

Last update: 2024-10-10 21:32:21 UTC


README

Generate SVG QR Codes. MIT license.

This is a stripped down version of https://github.com/kreativekorp/barcode inspired by another version at https://github.com/psyon/php-qrcode

Install via composer:

composer require splitbrain/php-qrcode

Usage:

use splitbrain\phpQRCode\QRCode;
echo QRCode::svg('hello world');

The above will directly output the generated SVG file. This file has no styles attached. Use CSS to style howver you want it:

svg {
    width: 10em;
    height: 10em;
    fill: #ff0000;
}

Options:

s - Symbology (type of QR code). One of:

    qrl
    qrm
    qrq
    qrh