Download the PHP package fahadahmadshemul/laravel-qrcode without Composer

On this page you can find all versions of the php package fahadahmadshemul/laravel-qrcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-qrcode

Laravel QrCode

A self-contained QR code generator for Laravel. The entire QR encoding pipeline — data encoding, Reed–Solomon error correction, matrix construction, masking and rendering — is implemented from scratch in this package. It has no third-party QR libraries in its runtime dependencies.

Features

Requirements

Installation

Laravel auto-discovery

The package registers itself automatically through Laravel's package discovery — no manual setup is required. It provides:

To customize the defaults, publish the config file:

This publishes config/qrcode.php (size, margin, format, error correction, and ECI defaults).

Basic usage

Use the facade and chain builder methods, then call generate():

The builder is also directly instantiable (and container-resolvable) without the facade:

Because the builder implements Stringable, casting it to a string generates the code as well:

SVG generation

SVG is the default format. Output is a compact, standalone XML document using a single <path> element for all modules, with shape-rendering="crispEdges".

PNG generation

PNG requires the GD extension. The requested pixel size is rounded down to a whole number of modules, and rendered dimensions are capped at 5000px to prevent excessive memory allocation.

Error correction

Choose a level with errorCorrection(). Higher levels tolerate more damage at the cost of larger symbols. An invalid level throws InvalidErrorCorrectionLevelException.

Level Recovery
L ~7%
M ~15% (default)
Q ~25%
H ~30%

Size and margin

size() sets the image side length in pixels; margin() sets the quiet-zone width measured in modules (default 4).

Colors

Set foreground and background colors independently, or both at once with color(). Hex codes and a set of named colors (black, white, red, green, blue, yellow, cyan, magenta, gray/grey) are supported for both formats; SVG additionally accepts any color string valid as an SVG fill. A background of transparent (or none) omits the background entirely.

File saving

save() writes the rendered code to disk, creating parent directories as needed. It throws FileWriteException on failure.

Base64

base64() returns the encoded code. By default it prefixes a data URI (using the format's content type); pass false for the raw Base64 string.

HTTP response

response() returns an Illuminate\Http\Response with the correct Content-Type. The builder also implements Responsable, so you can return it directly from a controller.

Blade directive

The @qrcode directive renders a QR code inline (best suited to SVG). It accepts the payload and an optional options array.

Supported option keys: size, margin, format, error_correction, foreground_color / color, background_color / background, encoding_mode / mode, and eci.

Supported QR versions

All 40 versions (1 through 40) defined by ISO/IEC 18004 are supported, from a 21×21 module symbol (Version 1) up to 177×177 (Version 40). The smallest version that fits the payload at the chosen error correction level is selected automatically. Payloads exceeding Version 40 capacity throw QrCodeOverflowException.

Supported encoding modes

Set the mode with encodingMode() (alias mode()), or leave it on auto:

For multibyte byte-mode payloads, a UTF-8 ECI header is declared automatically. Control it with eci(true|false|null), where null is automatic.

Testing

The suite covers the encoding pipeline, error correction, every version/ECC combination, rendering, and the public API. Integration tests decode the generated codes with a third-party decoder (a dev-only dependency) to confirm they are readable.

Architecture

The QR engine is framework-agnostic and organized into focused namespaces:

Fahad\QrCode\QrCode is the fluent builder that collects options and delegates to the engine; no algorithm code lives in it. The Laravel integration (service provider, facade, Blade directive, config) is a thin layer over that engine.

License

Released under the MIT License.


All versions of laravel-qrcode with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fahadahmadshemul/laravel-qrcode contains the following files

Loading the files please wait ...