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

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

akira/laravel-qrcode
====================

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

v2.0.0(1w ago)494.8k↑155.8%1[1 PRs](https://github.com/akira-io/laravel-qrcode/pulls)MITPHPPHP ^8.4CI passing

Since Dec 2Pushed 5d ago2 watchersCompare

[ Source](https://github.com/akira-io/laravel-qrcode)[ Packagist](https://packagist.org/packages/akira/laravel-qrcode)[ GitHub Sponsors](https://github.com/kidiatoliny)[ RSS](/packages/akira-laravel-qrcode/feed)WikiDiscussions 2.x Synced 3d ago

READMEChangelog (8)Dependencies (42)Versions (51)Used By (0)

[![img.png](docs/assets/banner.png)](docs/assets/banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/43ae35e519a36f3f3b83810026c85e51d9d4674be2d15eabfa7a37d9377e694d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616b6972612f6c61726176656c2d7172636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akira/laravel-qrcode)[![Tests](https://camo.githubusercontent.com/cf08cc455b1b31721c3c24cdb81cd41ab035e418f5d822c90e9f37bb7737b154/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6972612f6c61726176656c2d7172636f64652f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/akira/laravel-qrcode/actions/workflows/tests.yml)[![PHPStan](https://camo.githubusercontent.com/6a7c3caf59b32f39930ef2c32cdbbdb42cf558ea58c41e889f0d5957cec493cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616b6972612f6c61726176656c2d7172636f64652f7068707374616e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/akira/laravel-qrcode/actions/workflows/phpstan.yml)[![Total Downloads](https://camo.githubusercontent.com/750e79bca78a37c7a3b2a8d3a6d4430ca7299f1046fea4624d5a8ae5a766ebd7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616b6972612f6c61726176656c2d7172636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/akira/laravel-qrcode)

A clean, modern, and easy-to-use QR code generator for Laravel applications. Built with the Action Pattern, Value Objects, and full type safety. Features
--------

[](#features)

- Multiple output formats (PNG, SVG, EPS, WebP, PDF)
- Highly customizable (colors, gradients, styles, sizes)
- Specialized data types (WiFi, Email, vCard, Calendar, Phone, SMS, Geo, Bitcoin, Ethereum, Litecoin)
- Logo/image merging support (from a file path or string content)
- Built-in cache-backed generation and batch generation
- Artisan command (`qrcode:generate`) with CSV batch mode
- Type-safe with PHP 8.4+
- PHPStan Level 9 compliant with 100% type coverage
- Comprehensive test coverage

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

[](#requirements)

- PHP 8.4+
- GD extension
- Imagick extension for PNG, WebP, and PDF output
- Laravel 12.0+

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

[](#installation)

Install via Composer:

```
composer require akira/laravel-qrcode
```

Optionally, publish the configuration:

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

Quick Start
-----------

[](#quick-start)

```
use Akira\QrCode\Facades\QrCode;

// Simple text
$qrCode = QrCode::text('Hello World');

// With customization
$qrCode = QrCode::size(300)
    ->color(255, 0, 0)
    ->text('https://example.com');

// WiFi network
$qrCode = QrCode::wifi([
    'ssid' => 'MyNetwork',
    'password' => 'secret123'
]);

// Email
$qrCode = QrCode::email('contact@example.com', 'Subject', 'Body');

// Contact card
$qrCode = QrCode::vcard([
    'fullName' => 'Jane Doe',
    'email' => 'jane@example.com'
]);

// Calendar event
$qrCode = QrCode::ical([
    'summary' => 'Release planning',
    'startsAt' => '2026-06-01 10:00:00 UTC',
    'endsAt' => '2026-06-01 11:00:00 UTC'
]);

// Phone
$qrCode = QrCode::phone('+1234567890');

// Ethereum
$qrCode = QrCode::ethereum(
    '0x0000000000000000000000000000000000000001',
    '1000000000000000000'
);

// Litecoin
$qrCode = QrCode::litecoin('ltcaddress', 1.25);

// With styling
$qrCode = QrCode::size(400)
    ->gradient(255, 0, 0, 0, 0, 255, 'diagonal')
    ->style('round', 0.7)
    ->eye('circle')
    ->text('Styled QR Code');
```

Documentation
-------------

[](#documentation)

Browse the full documentation in [docs/](docs/README.md), or on the package website:

Highlights: [Installation](docs/01-installation.md) - [Configuration](docs/02-configuration.md) - [Data Types](docs/05-data-types.md) - [Customization](docs/06-customization.md) - [API Reference](docs/10-api-reference.md) - [Command Line](docs/14-cli.md)

Available Data Types
--------------------

[](#available-data-types)

TypeDescriptionExampleWiFiNetwork credentials`QrCode::wifi(['ssid' => 'Network', 'password' => 'pass'])`Emailmailto links`QrCode::email('email@example.com', 'Subject', 'Body')`vCardContact cards`QrCode::vcard(['fullName' => 'Jane Doe'])`CalendarVEVENT calendar entries`QrCode::ical(['summary' => 'Meeting', 'startsAt' => '2026-06-01 10:00:00 UTC', 'endsAt' => '2026-06-01 11:00:00 UTC'])`PhoneDirect dial`QrCode::phone('+1234567890')`SMSPre-filled message`QrCode::sms('+1234567890', 'Hello')`GeoGPS coordinates`QrCode::geo(37.7749, -122.4194, 'San Francisco')`BitcoinPayment address`QrCode::bitcoin('address', 0.001, ['label' => 'Donation'])`EthereumPayment address`QrCode::ethereum('0x...', '1000000000000000000', ['chainId' => 1])`LitecoinPayment address`QrCode::litecoin('address', 1.25, ['label' => 'Donation'])`Customization Options
---------------------

[](#customization-options)

OptionDescriptionValuesSizeDimensions in pixels`size(300)`ColorsForeground/background`color(r, g, b)`, `backgroundColor(r, g, b)`GradientsColor transitions`gradient(r1, g1, b1, r2, g2, b2, 'type')`StylesModule shapes`style('square|dot|round', 0-1)`EyesPattern styles`eye('square|circle')`, `eyeColor(...)`Error CorrectionData recovery`errorCorrection('L|M|Q|H')`FormatsOutput type`format('png|svg|eps|webp|pdf')`LogoImage merging`merge('/path/to/logo.png', 0.2)`Usage Examples
--------------

[](#usage-examples)

### In Blade Templates

[](#in-blade-templates)

```
{!! QrCode::format('png')->generate('https://example.com') !!}
```

### API Response

[](#api-response)

```
return response()->json([
    'qrcode' => base64_encode(QrCode::format('png')->generateRaw($data))
]);
```

### Download Response

[](#download-response)

```
$png = QrCode::format('png')->size(500)->generateRaw($data);

return response($png)
    ->header('Content-Type', 'image/png')
    ->header('Content-Disposition', 'attachment; filename="qrcode.png"');
```

### With Logo

[](#with-logo)

```
$qrCode = QrCode::format('png')
    ->size(400)
    ->errorCorrection('H')
    ->merge(public_path('logo.png'), 0.2)
    ->text('https://example.com');
```

Testing
-------

[](#testing)

```
# Run code quality checks and tests
composer test

# Run code style fixer
composer lint
```

Architecture
------------

[](#architecture)

This package is built with:

- **Action Pattern** - Single-responsibility business logic
- **Value Objects** - Immutable, validated data structures
- **Dependency Injection** - Laravel IoC container
- **Type Safety** - PHP 8.4+ with readonly classes
- **SOLID Principles** - Clean, maintainable code

See [Architecture Documentation](docs/09-architecture.md) for details.

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [Contributing Guide](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kidiatoliny](https://github.com/kidiatoliny)
- Built with [BaconQrCode](https://github.com/Bacon/BaconQrCode)
- All Contributors

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

Links
-----

[](#links)

- [Website](https://packages.akira-io.com/packages/laravel-qrcode)
- [Changelog](CHANGELOG.md)
- [Issue Tracker](https://github.com/akira-io/laravel-qrcode/issues)
- [Packagist](https://packagist.org/packages/akira/laravel-qrcode)

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance99

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 67% 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 ~22 days

Recently: every ~30 days

Total

10

Last Release

9d ago

Major Versions

v1.2.0 → v2.0.02026-06-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/c42e59ca0b3864a382dc0c3e290f8cf7d75bbe3eab10a3af0f71d5785f89d0bc?d=identicon)[kidiatoliny](/maintainers/kidiatoliny)

---

Top Contributors

[![kidiatoliny](https://avatars.githubusercontent.com/u/48266788?v=4)](https://github.com/kidiatoliny "kidiatoliny (138 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (55 commits)")[![akira-foundation[bot]](https://avatars.githubusercontent.com/in/3206645?v=4)](https://github.com/akira-foundation[bot] "akira-foundation[bot] (13 commits)")

---

Tags

qrcodeqrlaravelgeneratorbaconakira

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[linkxtr/laravel-qrcode

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

3720.4k](/packages/linkxtr-laravel-qrcode)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M200](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[webwizo/laravel-shortcodes

Wordpress like shortcodes for Laravel 11, 12 and 13

217700.9k8](/packages/webwizo-laravel-shortcodes)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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