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

1.1.0(2mo ago)431.4k—0%1[3 PRs](https://github.com/akira-io/laravel-qrcode/pulls)MITPHPPHP ^8.4CI passing

Since Dec 2Pushed 1mo ago1 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 1.x Synced 1mo ago

READMEChangelog (6)Dependencies (14)Versions (24)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)
- Highly customizable (colors, gradients, styles, sizes)
- Specialized data types (WiFi, Email, Phone, SMS, Geo, Bitcoin)
- Logo/image merging support
- Type-safe with PHP 8.4+
- PHPStan Level 9 compliant
- Comprehensive test coverage

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

[](#requirements)

- PHP 8.4+
- 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');

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

// 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)

Complete documentation is available in the package website:

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

[](#available-data-types)

TypeDescriptionExampleWiFiNetwork credentials`QrCode::wifi(['ssid' => 'Network', 'password' => 'pass'])`Emailmailto links`QrCode::email('email@example.com', 'Subject', 'Body')`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'])`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')`LogoImage merging`merge('/path/to/logo.png', 0.2)`Usage Examples
--------------

[](#usage-examples)

### In Blade Templates

[](#in-blade-templates)

```

```

### API Response

[](#api-response)

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

### Download Response

[](#download-response)

```
$png = QrCode::format('png')->size(500)->text($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 tests
composer test

# Run tests with coverage
composer test-coverage

# Run static analysis
composer analyse

# 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

51

—

FairBetter than 96% of packages

Maintenance87

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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 ~18 days

Recently: every ~24 days

Total

7

Last Release

57d ago

### 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 (67 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (33 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

[linkxtr/laravel-qrcode

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

295.1k](/packages/linkxtr-laravel-qrcode)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[devtical/nova-qrcode-field

Nova QR code field

4560.6k2](/packages/devtical-nova-qrcode-field)

PHPackages © 2026

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