Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Qrcode Laravel Package

chillerlan/php-qrcode

Generate and read QR codes in PHP. Supports Model 2 QR codes (versions 1–40), ECC levels L/M/Q/H, mixed encoding modes, and multiple output formats. Includes a QR code reader based on a PHP port of ZXing.

View on GitHub
Deep Wiki
Context7

QRStringJSON

Class QRStringJSON: JSON output.

Example

$options = new QROptions;

$options->outputType = QROutputInterface::STRING_JSON;
$options->jsonFlags  = JSON_THROW_ON_ERROR|JSON_UNESCAPED_SLASHES;

header('Content-type: application/json');

$data   = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';

echo new QRCode($options)->render($data); // -> JSON string

The associated JSON schema can be found over at GitHub: qrcode.schema.json

Previous functionality

The previous versions of php-qrcode (v5 and earlier) just dumped an array representation of the internal matrix, which is equivalent to the following:

$matrix = new QRCode($options)->getQRMatrix(); // -> QRMatrix instance

// retrieve the internal matrix as an array of booleans
$json   = json_encode($matrix->getMatrix(true), $jsonFlags);

Additional methods

method return description
(protected) row(int $y, array $row) array|null creates a DOM element for a matrix row
(protected) module(int $x, int $y, int $M_TYPE) array|null creates a DOM element for a single module

Options that affect this class

property type
$jsonFlags int
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport