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

QREps

Class QREps: Encapsulated Postscript (EPS) output.

Example

See: EPS example

Set the options:

$options = new QROptions;

$options->outputInterface  = QREps::class;
$options->scale            = 5;
$options->drawLightModules = false;
// colors can be specified either as [R, G, B] or [C, M, Y, K] (0-255)
$options->bgColor          = [222, 222, 222];
$options->moduleValues     = [
	QRMatrix::M_FINDER_DARK    => [0, 63, 255],    // dark (true)
	QRMatrix::M_FINDER_DOT     => [0, 63, 255],    // finder dot, dark (true)
	QRMatrix::M_FINDER         => [233, 233, 233], // light (false)
	QRMatrix::M_ALIGNMENT_DARK => [255, 0, 255],
	QRMatrix::M_ALIGNMENT      => [233, 233, 233],
	QRMatrix::M_DATA_DARK      => [0, 0, 0],
	QRMatrix::M_DATA           => [233, 233, 233],
];

Render and save to file:

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

new QRCode($options)->render($data, $file);

Push as file download in a browser:

header('Content-type: application/postscript');
header('Content-Disposition: filename="qrcode.eps"');

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

exit;

Additional methods

method return description
(protected) formatColor(array $values) string Set the color format string
(protected) module(int $x, int $y, int $M_TYPE) string Returns a path segment for a single module

Options that affect this class

property type
$bgColor array
$connectPaths bool
$drawLightModules bool
$excludeFromConnect array
$scale 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