PHPackages                             peartonlixiao/qr-code - 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. peartonlixiao/qr-code

ActiveLibrary

peartonlixiao/qr-code
=====================

基于phpqrcode生成二维码的工具类

v1.0.4(4y ago)119MITPHPPHP ^7.0

Since Sep 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pearton/qr-code)[ Packagist](https://packagist.org/packages/peartonlixiao/qr-code)[ RSS](/packages/peartonlixiao-qr-code/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (6)Used By (0)

```
# 二维码生成

基于phpqrcode生成二维码,使用简单。

## 特点

1. 不需其他扩展下载安装
2. 可自定义logo
3. 快速生成

## Install

`composer require "composer require peartonlixiao/qr-code"`

## Usage

```php
//如使用laravel tp等,则自动加载
require 'vendor/autoload.php';
use Peartonlixiao\Qrcode\QrcodeTool;

//生成带logo的二维码
$create = QrcodeTool::getInstance()
    //设置中间logo,如不写入该参数,则使用默认https://cdn.blog.justone.top/default.png
    ->setProperty('logo','https://cdn.blog.justone.top/default.png')
    //设置输出文件夹,默认[qrcode/]
    ->setProperty('outputDir','/qrcode/create/')
    //执行,参数为写入二维码的内容[字符串,网址,参数 自行定义]
    ->getTypeQrCodeLogo('test');

//生成图片二维码
$create = QrcodeTool::getInstance()
    //执行,参数为写入二维码的内容[字符串,网址,参数 自行定义]
    ->getTypeQrCode('test');

var_dump($create);
exit;
```

```
// 返回结果
array(4) {
  ["code"]=>
  int(200)
  ["msg"]=>
  string(12) "上传成功"
  ["data"]=>
  string(51) "/qrcode/create/26766286bde1432bf2e3ae7d1415a934.png"
  ["fileName"]=>
  string(36) "26766286bde1432bf2e3ae7d1415a934.png"
}
```

#### Laravel,TP等

`laravel`及`THINKPHP`等框架:

1.安装该插件

2.然后开始在你的项目里面使用了 `QrcodeTool::getInstance()...`

## License
MIT

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Every ~11 days

Total

5

Last Release

1658d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91a760e92105caf9d1bc302a20021ac6871a803e1dee2defa323210c6b70eb4c?d=identicon)[pearton](/maintainers/pearton)

---

Top Contributors

[![peartonli](https://avatars.githubusercontent.com/u/188771466?v=4)](https://github.com/peartonli "peartonli (5 commits)")

---

Tags

phpqrcode

### Embed Badge

![Health badge](/badges/peartonlixiao-qr-code/health.svg)

```
[![Health](https://phpackages.com/badges/peartonlixiao-qr-code/health.svg)](https://phpackages.com/packages/peartonlixiao-qr-code)
```

###  Alternatives

[chillerlan/php-qrcode

A QR Code generator and reader with a user-friendly API. PHP 8.4+

2.4k28.9M208](/packages/chillerlan-php-qrcode)

PHPackages © 2026

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