Weave 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
Qr Code Reader

Qr Code Reader Laravel Package

libern/qr-code-reader

A PHP/Laravel library that reads and decodes QR codes from image files. Its simple API returns the decoded text, making it easy to scan uploaded or stored QR images in your app. Includes Laravel service provider integration and supports common image formats.

View on GitHub
Deep Wiki
Context7

Simple PHP QR Code Reader / Decoder

Frequently asked questions about Qr Code Reader
How do I decode a QR code from an uploaded image in a Laravel app?
Store or move the upload to a real local path, then pass that absolute path to the library's reader method, which returns the decoded text payload. Wrap the call behind your own small contract, for example decode(string $absolutePath): ?string, bind it in a service provider, and call it from a queued job with a timeout so decoding never blocks a request cycle. This library is server-side decoding of image files only, so it is not a fit for live camera scanning in the browser.
How do I install libern/qr-code-reader with Composer?
Run composer require libern/qr-code-reader and call the reader class directly from your code, passing it the path to a QR image. There is no config file to publish and no facade to register, so the integration is a handful of lines. Check the README for the exact class and method names for the version you install, since the public surface is intentionally tiny.
Does libern/qr-code-reader support PHP 8.2, 8.3 and Laravel 10 or 11?
That is unverified and should be treated as a risk rather than an assumption: the last release dates from December 2020, so its PHP constraint and code style predate modern Laravel. Spike it on your actual base image and PHP minor, and expect to fork or patch deprecation notices. Because Laravel itself has no hard coupling here, the framework version matters far less than the PHP runtime and the decoder engine available in your container.
Does libern/qr-code-reader require zbar, ImageMagick or another system binary?
The PHP layer is a thin wrapper, and the real decoding work is delegated to an external engine in the zbar or ZXing family, which historically shipped bundled or was expected on the host. Read the source for your installed version to confirm whether the binary is vendored or must be provisioned, then add it plus any required image libraries to your Dockerfile and CI image. Composer install does not carry that dependency, so assert the binary's presence in a boot-time check or health endpoint instead of discovering it on first use.
Is libern/qr-code-reader safe to use in production if it shells out to a decoder binary?
Read the source first: if file paths are passed to exec or shell_exec without escaping, use escapeshellarg or keep user-controlled filenames away from the call. Many managed hosts disable exec and shell_exec entirely, in which case the package simply will not work there. Also note that failure signals are coarse, typically a null or empty result rather than a typed exception, so wrap the call and log inputs and outcomes yourself.
What does libern/qr-code-reader return when no QR code is found or decoding fails?
Expect a null value, false, or an empty string depending on the version you install, rather than a typed exception. That means your adapter must distinguish between no QR present, an unreadable image, and a crashed decoder, for example by validating the file first and logging the path alongside the result. Returning a nullable string from your own decode method keeps those semantics explicit for callers.
Is libern/qr-code-reader still maintained?
It is effectively a single-maintainer package with the last release in December 2020 and modest star counts, so assume no upstream fixes for PHP 8.x deprecations, security reports, or decoder-engine drift. Pin the version, fork it if you need patches, and keep it behind your own interface so it stays an implementation detail. Plan a migration path before you need one rather than after an incident.
Can I decode a QR code from an S3 file or a streamed upload instead of a local path?
The decoder needs a real local filesystem path, so S3 objects and streamed uploads must be materialized to a temp file first. Do that inside your adapter, using a temporary file plus a finally block to clean it up, so callers only ever pass a path or a stream and never think about it. Avoid leaving downloaded files around in storage after the job completes.
What are the best alternatives to libern/qr-code-reader?
The three realistic options are a pure-PHP ZXing port such as khanamiryan/qrcode-detector-decoder, which removes the system dependency at the cost of speed and accuracy; a hosted vision API such as Google Vision or AWS, which offloads accuracy and operations; and client-side JavaScript decoding for interactive flows. Because your boundary is a single method returning a string, any of these is a one-class swap. Keep that boundary in place from day one.
How do I test QR decoding in my Laravel test suite?
Fake your own decoder contract in unit and feature tests so the suite never touches the binary, and keep a small integration test that runs real fixture images against the installed decoder inside the CI image that has it provisioned. Use fixtures that reflect real traffic: rotated, low-contrast, skewed, and multi-code images. The package's own coverage and fixtures should not be relied on as your quality gate.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console