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

QRStringText

Class QRStringText: render in a CLI console, using ANSI colors and block elements.

Example

See: plaintext example

$options = new QROptions;

$options->outputInterface = QRStringText::class;
$options->eol             = "\n";
// add some space on the line start
$options->textLineStart   = str_repeat(' ', 6);
// default values for unassigned module types
$options->textDark        = QRStringText::ansi8('██', 253);
$options->textLight       = QRStringText::ansi8('░░', 253);
$options->moduleValues    = [
	QRMatrix::M_FINDER_DARK    => QRStringText::ansi8('██', 124),
	QRMatrix::M_FINDER         => QRStringText::ansi8('░░', 124),
	QRMatrix::M_FINDER_DOT     => QRStringText::ansi8('██', 124),
	QRMatrix::M_ALIGNMENT_DARK => QRStringText::ansi8('██', 2),
	QRMatrix::M_ALIGNMENT      => QRStringText::ansi8('░░', 2),
	QRMatrix::M_VERSION_DARK   => QRStringText::ansi8('██', 21),
	QRMatrix::M_VERSION        => QRStringText::ansi8('░░', 21),
];

Output:

$data   = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
$qrcode = new QRCode($options)->render($data);

echo "\n\n$qrcode\n\n";

Additional methods

method return description
ansi8(string $str, int $color, bool $background = null) string a little helper to create a proper ANSI 8-bit color escape sequence

Options that affect this class

property type
$eol string
$textDark string
$textLight string
$textLineStart string
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