An easy-to-use PHP QrCode generator with first-party support for Laravel.

Overview

Simple QrCode

Unit Tests Latest Stable Version Latest Unstable Version License Total Downloads

Deutsch | Español | Français | Italiano | Português | Русский | 日本語 | 한국어 | हिंदी | 简体中文 | العربية

Language files are currently out of date. We need volunteers to upgrade them to v4! Please submit a PR request!

Try our dead simple, free file transfer service keep.sh

keep.sh

Easy fast file sharing from the command line with a single curl command! curl --upload-file your-local-file.txt https://keep.sh

Introduction

Simple QrCode is an easy to use wrapper for the popular Laravel framework based on the great work provided by Bacon/BaconQrCode. We created an interface that is familiar and easy to install for Laravel users.

Official Documentation

Documentation for Simple QrCode can be found on our website.

Examples

Example 1 Example 2

Use Cases

Platform to sell tickets online

Contributing

Please submit all issues and pull requests to the simplesoftwareio/simple-qrcode repository on the develop branch!

License

This software is released under the MIT license.

Comments
  • upgrade 2.0 to 3.0

    upgrade 2.0 to 3.0

    Hello. How are you? Thank you for your update. I updated simple-qrcode 2.0 to 3.0. But I see this error. Class 'SimpleSoftwareIO\QRCode\QRCodeServiceProvider' not found I defined this code in 2.0. SimpleSoftwareIO\QRCode\QRCodeServiceProvider::class 'QRCode' => SimpleSoftwareIO\QRCode\Facedes\QRCode::class

    How to solve this problem? And Can I use previous code to generate qr code?

    documentation 
    opened by mosvict 20
  • QRCode margin and text case

    QRCode margin and text case

    Hi there. I am having an issue with the size of the QRCode. Some codes are of the size I gave them with zero margin, others have a margin (making the code smaller).

    Example:

    <img src="data:image/png;base64,{!! base64_encode(QrCode::format('png')->errorCorrection('Q')->size('100')->margin(0)->generate('DEMO-4444-55555-333-AAA-AAA')) !!}">
    <img src="data:image/png;base64,{!! base64_encode(QrCode::format('png')->errorCorrection('Q')->size('100')->margin(0)->generate('DEMO-4444-55555-333-BBB-AAa')) !!}">
    <img src="data:image/png;base64,{!! base64_encode(QrCode::format('png')->errorCorrection('Q')->size('100')->margin(0)->generate('DEMO-4444-55555-333-CCC-AaA')) !!}">
    <img src="data:image/png;base64,{!! base64_encode(QrCode::format('png')->errorCorrection('Q')->size('100')->margin(0)->generate('DEMO-4444-55555-333-DDD-aAA')) !!}">
    <img src="data:image/png;base64,{!! base64_encode(QrCode::format('png')->errorCorrection('Q')->size('100')->margin(0)->generate('DEMO-4444-55555-333-EEE-aaa')) !!}">
    <img src="data:image/png;base64,{!! base64_encode(QrCode::format('png')->errorCorrection('Q')->size('100')->margin(0)->generate('DEMO-4444-55555-333-EEE-BBB')) !!}">
    

    The result is:

    Result

    Why is there a margin in the codes that have lowercase? I've run a few tests and everytime a smallcase letter appears, the code gets a margin. If I for instance remove the "DEMO-4444-5555-" from the start of the text, every code keeps the same size.

    bug 
    opened by jfvoliveira 15
  • Error generating qr code

    Error generating qr code

    I have a problem while building the qr code, the error is "max (): Array must contain at least one element" I'm on a ubuntu server (laravel forge) with php 5.6.14 and laravel 5.1, is there any requirement besides the GD or something? thanks!

    bug 
    opened by gerciljunio 14
  • qrcode merge error

    qrcode merge error

    When a picture with transparency (PNG) is merged into a QR code, the four red boxes display the transparent part instead of the QR code. I can't do it like a demo.

    image image

    $qrcode = 'data:image/png;base64,'.base64_encode(QrCode::format('png')->merge('https://avatars0.githubusercontent.com/u/7749926?s=400&v=4',
                .32, true)->errorCorrection('H')->size(500)->generate($url));
    

    simple-qrcode version: 3.0.0 PHP 7.3.23 (cli) (built: Oct 1 2020 21:10:33) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.23, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.23, Copyright (c) 1999-2018, by Zend Technologies

    help wanted hacktoberfest 
    opened by lyekumchew 13
  • QrCode::encoding('SHIFT-JIS')

    QrCode::encoding('SHIFT-JIS')

    opened by mosvict 11
  • Allow a resample image merge

    Allow a resample image merge

    Instead of using the "simple" resize algorithm the resample algorithm can also be used when merging an image into the QR code. When the resampler is used, we get an anti-aliased merge and therefor a more pretty final result. The parameter that was added to the merge calls are always forced to be a boolean when they have to be set. This was done to be consistent with PHP's handling of "true-ness" for variables, while still having the internal variable as a strict type.

    The workaround for not doing this is generating a large QR code with a merged image and finaly scaling that back. (Or letting the browser handle this step)

    Another testcase was created to verify that setting the quality value in the ImageMerge class will actually yield a resampled and different result from the normal merge.

    The calls implemented in the facade have been documented in the readme and have a small description in code (where applicable). Some minor changes were made in the in-code documentation to reflect name changes etc. I also made the indentation in the readme consistent. It appeared that mainly tabs were used, so all instances of 4 spaces have been replaced with 1 tab.

    enhancement documentation 
    opened by tuupke 11
  • Sending QR code as email?

    Sending QR code as email?

    Hi,

    I'm trying to send the QR code as an email, but it simply doesn't display in the email client. I have tried both gmail and yahoo.

    To display the image I use <img src="data:image/png;base64, {{ base64_encode($qr) }} ">

    To send the email I use the following:

    $qr = QrCode::format('png')->size(200)->generate('http://google.com');
                    Mail::send(
                        'emails.product_redeem',
                        [
                            'account' => $product->user,
                            'product' => $product,
                            'qr' => $qr
                        ],
                        function ($m) use ($product) {
                            $m->to($product->user->email, $product->user->username)
                                ->subject('Prospector theater - Redeem product')
                                ->from('[email protected]', 'Prospector theater');
    
                        }
                    );
    

    I'm using Laravel 5.1 to send the email: http://laravel.com/docs/5.1/mail

    Any idea on how to come around this?

    documentation 
    opened by mikt 11
  • XML tag outputed?

    XML tag outputed?

    Hello,

    when I echo the SVG qrcode, I also see this: <?xml version="1.0" encoding="UTF-8"?>

    right before the qrcode is printed.

    What could that be?

    Thanks!

    need information 
    opened by huglester 11
  • Class 'QrCode' not found

    Class 'QrCode' not found

    Hi i'm having troubles installing the package, i got 'Class 'QrCode' not found' when i import it on my controller. i'm with Laravel 5.2, my config/app.php

    'providers' => [
    
            /*
             * Laravel Framework Service Providers...
             */
            Illuminate\Auth\AuthServiceProvider::class,
            Illuminate\Broadcasting\BroadcastServiceProvider::class,
            Illuminate\Bus\BusServiceProvider::class,
            Illuminate\Cache\CacheServiceProvider::class,
            Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
            Illuminate\Cookie\CookieServiceProvider::class,
            Illuminate\Database\DatabaseServiceProvider::class,
            Illuminate\Encryption\EncryptionServiceProvider::class,
            Illuminate\Filesystem\FilesystemServiceProvider::class,
            Illuminate\Foundation\Providers\FoundationServiceProvider::class,
            Illuminate\Hashing\HashServiceProvider::class,
            Illuminate\Mail\MailServiceProvider::class,
            Illuminate\Pagination\PaginationServiceProvider::class,
            Illuminate\Pipeline\PipelineServiceProvider::class,
            Illuminate\Queue\QueueServiceProvider::class,
            Illuminate\Redis\RedisServiceProvider::class,
            Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
            Illuminate\Session\SessionServiceProvider::class,
            Illuminate\Translation\TranslationServiceProvider::class,
            Illuminate\Validation\ValidationServiceProvider::class,
            Illuminate\View\ViewServiceProvider::class,
    
            /*
             * Application Service Providers...
             */
            PaylessAdmin\Providers\AppServiceProvider::class,
            PaylessAdmin\Providers\AuthServiceProvider::class,
            PaylessAdmin\Providers\EventServiceProvider::class,
            PaylessAdmin\Providers\RouteServiceProvider::class,
            Collective\Html\HtmlServiceProvider::class,
            Orangehill\Iseed\IseedServiceProvider::class,
            Barryvdh\DomPDF\ServiceProvider::class,
            Fedeisas\LaravelMailCssInliner\LaravelMailCssInlinerServiceProvider::class,
            Snowfire\Beautymail\BeautymailServiceProvider::class,
            SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class,
        ],
    
        /*
        |--------------------------------------------------------------------------
        | Class Aliases
        |--------------------------------------------------------------------------
        |
        | This array of class aliases will be registered when this application
        | is started. However, feel free to register as many as you wish as
        | the aliases are "lazy" loaded so they don't hinder performance.
        |
        */
    
        'aliases' => [
    
            'App' => Illuminate\Support\Facades\App::class,
            'Artisan' => Illuminate\Support\Facades\Artisan::class,
            'Auth' => Illuminate\Support\Facades\Auth::class,
            'Blade' => Illuminate\Support\Facades\Blade::class,
            'Cache' => Illuminate\Support\Facades\Cache::class,
            'Config' => Illuminate\Support\Facades\Config::class,
            'Cookie' => Illuminate\Support\Facades\Cookie::class,
            'Crypt' => Illuminate\Support\Facades\Crypt::class,
            'DB' => Illuminate\Support\Facades\DB::class,
            'Eloquent' => Illuminate\Database\Eloquent\Model::class,
            'Event' => Illuminate\Support\Facades\Event::class,
            'File' => Illuminate\Support\Facades\File::class,
            'Gate' => Illuminate\Support\Facades\Gate::class,
            'Hash' => Illuminate\Support\Facades\Hash::class,
            'Lang' => Illuminate\Support\Facades\Lang::class,
            'Log' => Illuminate\Support\Facades\Log::class,
            'Mail' => Illuminate\Support\Facades\Mail::class,
            'Password' => Illuminate\Support\Facades\Password::class,
            'Queue' => Illuminate\Support\Facades\Queue::class,
            'Redirect' => Illuminate\Support\Facades\Redirect::class,
            'Redis' => Illuminate\Support\Facades\Redis::class,
            'Request' => Illuminate\Support\Facades\Request::class,
            'Response' => Illuminate\Support\Facades\Response::class,
            'Route' => Illuminate\Support\Facades\Route::class,
            'Schema' => Illuminate\Support\Facades\Schema::class,
            'Session' => Illuminate\Support\Facades\Session::class,
            'Storage' => Illuminate\Support\Facades\Storage::class,
            'URL' => Illuminate\Support\Facades\URL::class,
            'Validator' => Illuminate\Support\Facades\Validator::class,
            'View' => Illuminate\Support\Facades\View::class,
            'Form' => Collective\Html\FormFacade::class,
            'Html' => Collective\Html\HtmlFacade::class,
            'PDF' => Barryvdh\DomPDF\Facade::class,
            'QrCode' => SimpleSoftwareIO\QrCode\Facades\QrCode::class 
        ];
    ];
    

    I tried cleaning vendor folder and compiled files then reinstalling but i still get that error ... why? Please help me i really need this package for my aplication..

    opened by mauudev 10
  • Call to undefined function BaconQrCode\Encoder\iconv()

    Call to undefined function BaconQrCode\Encoder\iconv()

    i had try composer update,

    when i use this i get the error

    <div class="visible-print text-center">
                    {!! QrCode::size(100)->generate($register->token) !!}
                    <p>Scan me to return to the original page.</p>
                </div>
    
    invalid 
    opened by f0ntana 9
  • How to generate qrocde for dynamic generating image and url?

    How to generate qrocde for dynamic generating image and url?

    gives error

    production.ERROR: syntax error, unexpected '<'

    opened by iamkumarishwetha 8
  • non-conforming drawing primitive definition

    non-conforming drawing primitive definition

    Hello,

    When we want to generate a PNG QR Code, we're facing this issue :

    "non-conforming drawing primitive definition `20' @ error/draw.c/DrawImage/3192"

    You can find a debug printscreen : https://beta.easy-aide.ch/images/error.png

    And here's the link to see it : https://beta.easy-aide.ch/public/pdf/certificat/28653/html

    Any idea ?

    Thanks a lot in advance

    opened by versantweb 0
  • Generate QRCode via javascript, is it possible?

    Generate QRCode via javascript, is it possible?

    I need to generate the qrcode based on the selection of data in a SELECT, capture it via javascript and then generate the qrcode, is it possible to do this?

    opened by AgostinhoBarbosa 0
  • wifi qr code genrate not working

    wifi qr code genrate not working

    hello ,
    im trying to genarate new QR Code and save it to my assets , im using this code : \QrCode::size(300)->generate( 'wifi:WEP/WPA;SSID;PSK;Hidden(True/False)', public_path('uploads/user_'.auth()->user()->resturant->id.'_wifi_'.'.svg') );

    and its genart Qr Code for text not wifi where is the problem ?

    opened by majedqatousa 0
  • Unable to find custom QR

    Unable to find custom QR "clickable" method in the documentation

    Hello,

    I am unable to find something like this in your documenation:

                        {!! QrCode::size(200)->link([
                        'https://' => 'website.com',
                        'param1' => $user->id,
                        'param2' => $user->email,
                        'param3' => $user->name,
                        ]) !!}
    

    Which would then open a website with the below GET parameters upon scanning:

    https://website.com?id&[email protected]&freddy
    

    Is this not possible with your library?

    As I can see helpers, but nothing in between apart from a single generate() method for a string.

    Thank you!

    opened by Benoit1980 0
  • Resolution/quality, different between versions

    Resolution/quality, different between versions

    Used version 2 and the qrcode had a good resolution. Now that I migrated to version 4, because I'm using php 8.1, the same qrcode is blurred.

    Code used in both versions: <img src="data:image/png;base64, '.base64_encode($qrcode->format('png')->size(90)->margin(1)->generate($row['codigo'])).' ">

    qrcode generated in version 2

    https://i.imgur.com/8xw1BEM.png

    qrcode generated in version 4

    https://i.imgur.com/LCkKPHN.png

    Did you notice that in version 4 the edges are a little blurred? They should be clear.

    How to solve it?

    Thanks.

    opened by tiagocaus 0
Releases(4.2.0)
Owner
Simple Software LLC
Keep it Simple
Simple Software LLC
PHP com duas funções: uma para gerar a linha do Pix Copia e Cola e outra para gerar o QRCode baseado no retorno da primeira função.

pix-copiacola-qrcode Pix.php - Funções para gerar, de forma simples, a linha "Copia e Cola" e o QRCode Necessita PHP 7 ou superior Para o QRCode usa a

Rogerio Arvy Vitiello 8 Oct 6, 2022
A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

Lychee A great looking and easy-to-use photo-management-system. Since the 1st of April 2018 this project has moved to it's own Organisation (https://g

Tobias Reich 6.2k Dec 31, 2022
A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

Lychee Organisation 2.3k Jan 1, 2023
A Sharex IMG uploader that runs with PHP | Use a hosting site if you're a beginner use 000webhost

Sharex-Img-Uploader A Sharex IMG uploader that runs with PHP | Use a hosting site if you're a beginner use 000webhost Setting up SXCU In YOUR_DOMAIN_U

Pix 10 Nov 26, 2022
phpThumb() - The PHP thumbnail generator

phpThumb phpThumb() - The PHP thumbnail generator phpThumb() uses the GD library and/or ImageMagick to create thumbnails from images (GIF, PNG or JPEG

James Heinrich 292 Dec 17, 2022
Multiavatar is a multicultural avatar generator.

Multiavatar Multiavatar is a multicultural avatar generator. In total, it is possible to generate 12,230,590,464 cryptographically unique avatars. Ini

Multiavatar 609 Dec 29, 2022
QR Code Generator

QR Code By endroid If you like my work you can show appreciation by sponsoring via Github Sponsors or send me some ADA at DdzFFzCqrhszSwiFWMBQomfv6mkD

Jeroen van den Enden 3.9k Dec 30, 2022
Wonderfully easy on-demand image manipulation library with an HTTP based API.

Glide Glide is a wonderfully easy on-demand image manipulation library written in PHP. Its straightforward API is exposed via HTTP, similar to cloud i

The League of Extraordinary Packages 2.4k Dec 19, 2022
Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

Image Optimizer This library is handy and very easy to use optimizer for image files. It uses optipng, pngquant, jpegoptim, svgo and few more librarie

Piotr Śliwa 879 Dec 30, 2022
An easy and elegant way to generate gravatars 🖼

pH2Gravatar The simplest Gravatar PHP package An easy and elegant way to generate gravatar profile photos from email addresses ?? ⛏ Requirements PHP 7

♚ PH⑦ de Soria™♛ 6 Jul 12, 2022
PHPExif is a library which gives you easy access to the EXIF meta-data of an image

PHPExif v0.6.4 PHPExif is a library which gives you easy access to the EXIF meta-data of an image. PHPExif serves as a wrapper around some native or C

null 135 Dec 4, 2022
🤹‍♀️Very simple to use Gravatar implementation for Laravel

Very simple to use Gravatar implementation for Laravel. Install, Include the Facade and then generate, simple! Installation You can install the packag

Wavey 11 May 7, 2022
This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.

Laravel FFMpeg This package provides an integration with FFmpeg for Laravel 6.0 and higher. Laravel's Filesystem handles the storage of the files. Fea

Protone Media 1.3k Jan 7, 2023
This is an image manipulation REST API written in PHP Laravel Framework

Laravel Image Manipulation REST API Demo Here is fully working Demo: https://www.lobiimages.com/ You have to register first in order to generate acces

TheCodeholic 42 Dec 15, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
Auto Image & file upload, resize and crop for Laravel eloquent model using Intervention image

Laravel ImageUp The qcod/laravel-imageup is a trait which gives you auto upload, resize and crop for image feature with tons of customization. Install

QCode.in 708 Dec 22, 2022
Laragram is a simple instagram "clone" built with Laravel and Tailwind CSS

Laragram is a simple instagram "clone" built with Laravel and Tailwind CSS that gives to the users the ability to create or edit their own profiles (including profile image and description), upload images and share them among friends

null 0 Jul 24, 2021
Laravel Qcloud Content Security T-Sec 腾讯云内容安全(文字图片内容审核)服务

Laravel Qcloud Content Security T-Sec 天御内容安全服务使用了深度学习技术,识别文本/图片中出现的可能令人反感、不安全或不适宜内容,支持用户配置词库/图片黑名单,识别自定义的识别类型。

安正超 34 Jun 20, 2022
An open source image hosting service powered by Laravel

Limg An open source image hosting service powered by Laravel Features Upload your image via file, url or ShareX ! Manage your image (custom title, pub

Thomas 56 Dec 16, 2022