PHPackages                             devoton/qrcode - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. devoton/qrcode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

devoton/qrcode
==============

Open-source Laravel QR code generator with a native PHP engine for SVG, PNG and data URI output.

0.1.0(1mo ago)180↓100%MITPHPPHP ^8.2CI failing

Since Apr 16Pushed 1mo agoCompare

[ Source](https://github.com/otontraore/qrcode)[ Packagist](https://packagist.org/packages/devoton/qrcode)[ Docs](https://github.com/otontraore/qrcode)[ RSS](/packages/devoton-qrcode/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

DevOton QR Code
===============

[](#devoton-qr-code)

Laravel package for generating QR codes with a native PHP engine.

It supports SVG, PNG, data URI output, a fluent builder, and Laravel container or facade usage.

Repository:

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Laravel `^11.0|^12.0`
- GD extension for PNG output

Installation
------------

[](#installation)

```
composer require devoton/qrcode
```

Publish the config if you want to override defaults:

```
php artisan vendor:publish --tag=devoton-qrcode-config
```

Quick start
-----------

[](#quick-start)

```
use DevOton\QrCode\Contracts\QrCodeGeneratorInterface;

$generator = app(QrCodeGeneratorInterface::class);

$svg = $generator->svg('https://example.com');
```

Using the facade:

```
use DevOton\QrCode\Facades\DevOtonQrCode;

$png = DevOtonQrCode::png('https://example.com', [
    'size' => 180,
    'margin' => 2,
    'foreground' => '#111827',
    'background' => '#ffffff',
    'error_correction' => 'medium',
]);
```

Using the fluent builder:

```
use DevOton\QrCode\Contracts\QrCodeGeneratorInterface;

$svg = app(QrCodeGeneratorInterface::class)
    ->make('https://example.com')
    ->size(220)
    ->margin(3)
    ->foreground('#0f172a')
    ->background('#ffffff')
    ->errorCorrection('quartile')
    ->encoding('UTF-8')
    ->asSvg();
```

Output methods
--------------

[](#output-methods)

```
$svg = $generator->svg('https://example.com', 160, 2);

$png = $generator->png('https://example.com', [
    'size' => 160,
    'margin' => 2,
]);

$dataUri = $generator->dataUri('https://example.com', [
    'format' => 'svg',
]);

$generator->save('https://example.com', storage_path('app/qrcode.svg'));
```

Options
-------

[](#options)

OptionTypeNotes`size``int`Final size in pixels. Must be greater than `0`.`margin``int`Quiet zone in modules. Must be `0` or more.`encoding``string`Input encoding, for example `UTF-8` or `ISO-8859-1`.`error_correction``string``low`, `medium`, `quartile`, or `high`.`foreground``string`Foreground color as a 6-digit hex value.`background``string`Background color as a 6-digit hex value.`format``string``svg` or `png`. Used by `dataUri()` and `save()`.Configuration
-------------

[](#configuration)

Published file: `config/devoton-qrcode.php`

Defaults inside the package:

```
return [
    'default_size' => 150,
    'default_margin' => 1,
    'encoding' => 'UTF-8',
    'default_error_correction' => 'low',
    'default_foreground' => '#000000',
    'default_background' => '#ffffff',
];
```

Notes
-----

[](#notes)

- PNG rendering requires the PHP GD extension.
- The current engine focuses on byte mode.
- Colors currently accept 6-digit hexadecimal values.

Development
-----------

[](#development)

Run formatting and the package test suite before a release or pull request:

```
vendor/bin/pint --dirty --format agent
php artisan test --compact packages/devoton/qrcode/tests/Feature/DevOtonQrCodePackageTest.php packages/devoton/qrcode/tests/Unit/DevOtonQrCodeNativeFoundationTest.php packages/devoton/qrcode/tests/Unit/DevOtonQrCodeNativePipelineTest.php packages/devoton/qrcode/tests/Unit/DevOtonQrCodeConformanceTest.php packages/devoton/qrcode/tests/Unit/DevOtonQrCodeCodewordSnapshotTest.php packages/devoton/qrcode/tests/Unit/DevOtonQrCodeIntermediateSnapshotTest.php
```

See `CHANGELOG.md` for release history and `RELEASE.md` for the release checklist.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance89

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

54d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d583508f3534cbc4b45e1dd121031bea58df5f3b3737cea3c492f6647dbde5d?d=identicon)[devoton](/maintainers/devoton)

---

Top Contributors

[![otontraore](https://avatars.githubusercontent.com/u/212751929?v=4)](https://github.com/otontraore "otontraore (2 commits)")

---

Tags

native-qr-enginepackagist-qr-cod-enative-phpphp-qrcodepng-laravel-svg-data-uriqr-code-generator-phpqr-code-laravelqr-code-nativeqr-code-svgphpdata-uriqr codelaravelsvgpngpackagistlaravel qr codeqr-code-generatornative-phpphp qr codenative qr engineqr-code-svg

### Embed Badge

![Health badge](/badges/devoton-qrcode/health.svg)

```
[![Health](https://phpackages.com/badges/devoton-qrcode/health.svg)](https://phpackages.com/packages/devoton-qrcode)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.4k](/packages/larastan-larastan)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k239.9k72](/packages/moonshine-moonshine)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3614.9k](/packages/linkxtr-laravel-qrcode)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
