PHPackages                             wenxin/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. wenxin/qrcode

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

wenxin/qrcode
=============

This is a QR code generator that can customize your own QR code.

085PHP

Since Jun 28Pushed 6y agoCompare

[ Source](https://github.com/GWenXin/qrcode)[ Packagist](https://packagist.org/packages/wenxin/qrcode)[ RSS](/packages/wenxin-qrcode/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

QR Code Generator
=================

[](#qr-code-generator)

This is a qr code generator package that can customize your own QRcode with size, color, background color, margin, icon, curve, and frame.

### Run this command to install package

[](#run-this-command-to-install-package)

```
$ composer require wenxin/qrcode
```

### Install Imagick Extension

[](#install-imagick-extension)

User is requires to install Imagick PHP extension to create and modify images in this package.

-

### Open config/app.php file and add this class to the providers array.

[](#open-configappphp-file-and-add-this-class-to-the-providers-array)

```
Wenxin\Qrcode\QrCodeServiceProvider::class
```

### At the same file (config/app.php) add the following line to aliases array.

[](#at-the-same-file-configappphp-add-the-following-line-to-aliases-array)

```
'QrCode' => Wenxin\Qrcode\Facades\QrCode::class
```

### Add 'use QrCode' on top when you are implementing.

[](#add-use-qrcode-on-top-when-you-are-implementing)

```
use QrCode;
```

Description Parameters and Example
----------------------------------

[](#description-parameters-and-example)

#### format('png') - string

[](#formatpng---string)

- QR code file type

#### size(500) - integer

[](#size500---integer)

- Sets QR code size(px). Size range from 0 to 1000px.

#### color('8E44AD') - string

[](#color8e44ad---string)

- Sets QR code color(Hex). Keyin without '#', example: 28B463, 8E44AD

#### backgroundColor('FDEBD0') - string

[](#backgroundcolorfdebd0---string)

- Sets QR code background color(Hex). Keyin without '#', example: F9E79F, FDEBD0

#### margin(2) - integer

[](#margin2---integer)

- Sets border size(px) of the QR code. Size range from 0 to 10px.

#### errorCorrection('H') - string

[](#errorcorrectionh---string)

- Sets QR code error correction. QR Code has error correction capability to restore data if the code is dirty or damaged. Four error correction levels ('L' - 7%, 'M' - 15%, 'Q' - 25%, 'H' - 30%) are available for users to choose according to the operating environment. Raising this level improves error correction capability but also increases the amount of data QR Code size.

#### encoding('UTF-8') - string

[](#encodingutf-8---string)

- Sets the character encoder.Define 'UTF-8' as a default value.
- Encoding list : ISO-8859-1, ISO-8859-2 ,ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-11, ISO-8859-12, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16, SHIFT-JIS, WINDOWS-1250, WINDOWS-1251, WINDOWS-1252, WINDOWS-1256, UTF-16BE, UTF-8, ASCII, GBK, EUC-KR.

#### generate('This is a QR code generator.', storage\_path('qrcode.png')) - string

[](#generatethis-is-a-qr-code-generator-storage_pathqrcodepng---string)

- QR code content value e.g Text, URl, Tel.
- Save 'qrcode.png' file at laravel storage.

#### curve(5) - integer

[](#curve5---integer)

- Sets curve size (px) of QR code. Size range from 1 to 10px.

#### merge\_icon('icon/logo14.png', 4) - string, integer

[](#merge_iconiconlogo14png-4---string-integer)

- Upload and merge icon at the center of the QR code. Maximum 5MB (upload .png file only)
- Sets size of the icon. Range of the size is 2 to 5. The larger the number the smaller the size.

#### frame('frame/frame8.png', 630, 630) - string, integer

[](#frameframeframe8png-630-630---string-integer)

- Upload frame for merge QR code. Maximum 5MB (upload .png file only).
- Sets frame width and height size(px) of QR code frame. Maximum 1100px.

#### position(100, 100) - integer

[](#position100-100---integer)

- Sets position X and Y (px) of QR code in the frame. Position range from 0 to 300px.

#### Overwrite

[](#overwrite)

- True: To allow the system overwrite the existing QRcode and overwrite with the new one.
- False: System will not allow duplicate filename, it will prompt an error.

### Workflow of the QR code generator

[](#workflow-of-the-qr-code-generator)

First, generate a basic qrcode and saved file as 'qrcode.png'. Then, use 'qrcode.png' file to implement the customize with curve, icon, and frame.

#### Important

[](#important)

Have to follow the sequence

Example Code (Have to follow the sequence)
------------------------------------------

[](#example-code-have-to-follow-the-sequence)

```
        $qrcodeImage = QrCode::format('png') //set qr format
            ->size(300) // set qrcode size
            ->errorCorrection('H') //set qrcode error correction
            ->color('FF00FF') //set qr color
            ->backgroundColor('00FF00') // set qrcode background color
            ->encoding('UTF-8') //set the character encoder.
            ->overwrite(true) //set new qrcode will overwrite existing file
            ->margin(0) // set qrcode border
            ->generate('This is a custom QR code generator.','qr') //set qrdata ,and second param is filename (optional)
            ->curve(5) // set curve of the qrcode
            ->merge_icon('icon/download.png',4)  // merge icon at the center of the qrcode & set icon size
            ->frame('frame/frame2.png', 600, 600) //frame file ,frame width and height
            ->position(150,150);  //set qrcode position x and y in the frame
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f14d24565859cb8dcf0833098a7417852b45234d355c7616203dff9e800e0af?d=identicon)[Goh Wen Xin](/maintainers/Goh%20Wen%20Xin)

---

Top Contributors

[![GWenXin](https://avatars.githubusercontent.com/u/35371618?v=4)](https://github.com/GWenXin "GWenXin (271 commits)")

### Embed Badge

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

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

###  Alternatives

[froiden/laravel-installer

Laravel web installer

10883.9k](/packages/froiden-laravel-installer)

PHPackages © 2026

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