Giter Club home page Giter Club logo

simple-qrcode's People

Contributors

ablunier avatar ahallhognason avatar anthonyaxenov avatar chikaldirick avatar colinschoen avatar felipewmartins avatar francisek avatar gtarraga avatar hello-liang-shan avatar himanshu81494 avatar jartaud avatar jcorrego avatar kimitaka avatar lednerb avatar leonardozanotti avatar lupinitylabs avatar lyekumchew avatar mazedlx avatar n7best avatar nunomaduro avatar ousid avatar salim-hassan avatar samuelnitsche avatar simplycorey avatar sportdude avatar sugie avatar tsiedsma avatar tuupke avatar yoobato avatar zbrettonye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-qrcode's Issues

Sending qrcode through api

Hi I have question regarding using this package. So i tried sending the qrcode xml data. how do I read the data in view page? I tried using (i use angularjs) but the tag is not working as what i expected. Any help would be appreciated!!

How to use helper?

Hello, I'm not able to use
QrCode::email('[email protected]', 'This is the subject.', 'This is the message body.');

It throws following error :
Call to undefined method SimpleSoftwareIO\QrCode\BaconQrCodeGenerator::email()

QRCode geo - no mark?

Hello

I am able to generate PNG GEO qrcode. But when maps are opened, there are no marker on the map.. it is just centered at that location.. is it normal behaviuor? Or maybe I can add marker somehow?

Thanks!

S3 Support?

Is it possible to upload the QRCode to Amazon S3 without saving to the webserver first?

Any way to add plain text on the QR code?

Something like a number or a text on the bottom of the QR.
I saw some classes who use setLabel('text here') to the QR code generator..
Do we have it here as well?
Thanks.

One line code is not correct for Laravel 5.1.16 (LTS)

Today I'm trying to use this great lib and encounter an error(500).

I changed following code and then it works nice.
{{ QrCode::size(100)->generate(Request::url()); }}
to:
{!! QrCode::size(200)->generate(Request::url()) !!}

Hope it helps.

Error when using it with Github

When pulling my branch from github to my local environment and then doing "composer install" I get the following error message.

Please be kind and help me debug it.
What Files do you need?

Generating autoload files
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'SimpleSoftwareIO\QrCode\QrCodeServiceProvider' not found","file":"D:\wamp\www\test\project\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php","line":158}}Script php artisan clear-compiled handling the post-update-cmd event returned with an error

Edit:
It has clearly to do with your package, because I can user my branch if I remove qr-code related files from the app.php and composer.json

How to insert a line break?

hi, I've been trying to insert a line break into the info I'm encoding in the QR but I haven't been able to. I've tried many different things including adding a "\n" char with no results. Any help?

Attach QR code to Dompdf generated document

Please Help,
I am just getting an error in the PDF : Image not readable or empty
{!!$message->embedData(QrCode::format('png')->generate('Embed me into an e-mail!'), 'QrCode.png', 'image/png')!!}
Thanks

Call to undefined function BaconQrCode\Encoder\iconv()

I'm using this command on my view
{{QrCode::generate('Make me into a QrCode!')}}
and then when I'm going to this page I'm getting this error:
FatalErrorException in Encoder.php line 627: Call to undefined function BaconQrCode\Encoder\iconv()

Any idea why?

Caching?

GREAT library! Really good job.

What about caching? I guess you could easily cache the QR Codes sorely by its value?

Not correct QR Code

Hello! I tried generate QR Code using your library. That is my code:

<img src="data:image/png;base64, {{ base64_encode(QrCode::format('png')->size(200)->encoding('UTF-8')->errorCorrection('H')->generate("Hello World!")); }}">

But I got incorrect QR Code, I attach them.
Generated QR
Sorry for my bad English :-)

Max string length size

Hello,

  1. What is the maximum length size of a generated string?
  2. Do we have relation between "string length" to "size()" function?
  3. Do we have relation between "string length" to "errorCorrection('*_Change to Char_')"?

10xxxx, Lior :)

[BUG] Generating qr codes in a loop leads to empty qr codes

When using the QrCode facade in a foreach loop, the qr codes get saved to storage and appear empty. I've tested a custom loop with the BaconQr code, assigning the $renderer anew in every loop and it works. This means the QrCode should become a factory as to accomodate looping creation.
For example, this doesn't work:
foreach ($iterator as $iter) { QrCode::generate('something'.$iter, '../path/something'.$iter.'.svg'); }
This works fine:
foreach ($iterator as $iter) { $renderer = new Svg(); $writer = new Writer($renderer); $writer->writeFile('something'.$iter, '../public/something'.$iter.'.svg'); }

Class 'SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class' not found

tried and followed every steps from here
https://github.com/SimpleSoftwareIO/simple-qrcode
but I still get this error

FatalErrorException in ProviderRepository.php line 150:
Class 'SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class' not found

Using laravel 5.0...any idea? tried
-composer update
-composer self-update
-composer dump-autoload
-composer update -o

added this in composer.json,autoload there

"psr-0": {
    "SimpleSoftwareIO\\QrCode\\": "src"
}

but nothing work, please help me. Did I miss anything else?

Margin not working correctly

If I use margin(0), it gives me the same thing as margin(1) and margin(2). Then if I do margin(3) it gives me the same thing all the way up to margin(10).

Anyway, margin(0) is good enough for me but I thought I'd point this out. Thanks for the good work!

Logo on QR-Code

Is there a way to implement a logo to the qrcode? I need this for my compay website :(

Kind regards

ErrorException in line 0: max():

Hi, I have this error when trying to generate qrcode:

ErrorException in line 0:
max(): Array must contain at least one element

I'm running on ubuntu nginx+hhvm laravel 5.1

I can't figure out what's going wrong, can anyone advice?

[Feature Request] Background Transparency

I'm using this package to show QR code on my page, but I need to make the background transparent.

How I can do it?

<div >
{!! QrCode::size(300)->color(255,255,255)->backgroundColor(0,0,0)->margin(0)->generate(Request::url()); !!}
</div>

[L5] Generating really slow

Hi,
i am using your awesome package, but i have a problem with the generate and save.

I create 1 QrCode in 2 Formats (svg and png) the file size from png = 4kb, the size from svg = 40kb.

All good. But at this generation time is really slow (12 seconds). I think 2 small pictures can not generate so long.

Sorry for my english, i am german ;)

SMS Body is not composing

QrCode::SMS($phone_number, "Test Test");
By doing above it doesn't compose the SMS Body

private $prefix = 'sms'; to this private $prefix = 'SMSTO:'; I changed and it worked.

Am I doing it correct?

VCard not work!

I used simple-qrcode1.3.0 in laravel 5,MeCard is cool,But VCard not work.

when i use this code

{!! QrCode::size(400)->encoding('UTF-8')->generate('BEGIN:VCARD \r\n VERSION:3.0 \r\n N:Lastname;Surname \r\n FN:Displayname \r\n ORG:OrgName \r\n URL:http://www.url.com/ \r\n EMAIL:[email protected] \r\n TEL;TYPE=voice,work,pref:+555-555-5555 \r\n ADR;TYPE=intl,work,postal,parcel:;;Street;City;;Zip;Country \r\n END:VCARD') !!}

Scan it ,can not read the info

[Bug] I can't create QRCode for vcard or mecard

This is 2 way is used

  1. MECARD folowing guide in project's page

    $vcard = "MECARD:$first_name, $last_name;;TEL:$mobile;EMAIL:$email";
    <img src="data:image/png;base64,{{ base64_encode(QrCode::errorCorrection('H')->format('png')->size(152)->generate($vcard)); }} ">

  2. VCard

    $vcard = "BEGIN:VCARD\r\n";
    $vcard .= "VERSION:3.0\r\n";
    $vcard .= "FN:$first_name $last_name\r\n";
    $vcard .= "N:$last_name;$first_name ;;;\r\n";
    $vcard .= "ADR;TYPE=home:$address\r\n";
    $vcard .= "EMAIL;TYPE=INTERNET;TYPE=WORK:$email\r\n";
    $vcard .= "TEL;TYPE=CELL:$mobile\r\n";
    $vcard .= "END:VCARD\r\n";
    <img src="data:image/png;base64,{{ base64_encode(QrCode::errorCorrection('H')->format('png')->size(152)->generate($vcard)); }} ">

both 2 way throw error

Could not encode content to ISO-8859-1 (View: ...)

->size() breaks merge()

It appears if I attempt to use size() either before or after the merge method in a chain - the image is not merged.

Example:
<img src="data:image/png;base64, {!! base64_encode(QrCode::format('png')->merge('/public/tiny-green.png',.3)->size(190)->generate($url)) !!}">

QR code generates properly - but without the merged image. (http://goo.gl/ImyLlm)

If you remove size - it generates the code like a boss, complete with merged image (http://goo.gl/dlZGgi)

why the png file is so small

code:

QRCode::size(430)->margin(0)
            ->format('png')
            ->generate(informations', '../public/qrcode/code.png');

code

when I remove format('png') and change file name is code.svg, works fine.

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?

PNG outputs weird characters

I have this :

Route::get('/test', function(){
    return QrCode::encoding('UTF-8')->format('png')->size(500)->generate('Make me a QrCode!');
});

and when I visit the route /test, I get a weird characters, something like :

�PNG
�

IHDR������D�H�  pHYs������+�� .IDATx����N���Eч���dtgO,A�N�ص��jUgVo3:o��������o?�'�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A���$�A������������?�7���������O����y��s�ƭ���;@�����;@�����;@

Shouldn't I get a PNG image ? or how do get a <img ...> tag ?

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!

laravel 5.1LTS can't use

wen I use QrCode::generate('Make me into a QrCode!')

got this:
Call to undefined method SimpleSoftwareIO\QrCode\Facades\QrCode::generate()

Getting Class 'SimpleSoftwareIO\QrCode\QrCodeServiceProvider' not found

Hey there! I read through the previous issues but none helped me unfortunately. I just installed this on Laravel 5.1.

This is my composer.json file:

"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "tymon/jwt-auth": "0.5.*",
    "folklore/image": "0.2.*",
    "thujohn/twitter": "^2.2",
    "sammyk/laravel-facebook-sdk": "^3.0",
    "simplesoftwareio/simple-qrcode": "^1.4"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "pre-update-cmd": [
        "php artisan clear-compiled"
    ],
    "post-update-cmd": [
        "php artisan optimize"
    ],
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ]
},
"config": {
    "preferred-install": "dist"
}

And my app.php file:

'debug' => env('APP_DEBUG', true),
'url' => 'http://localhost',
'timezone' => 'UTC',
'locale' => 'en',
'fallback_locale' => 'en',
'key' => env('APP_KEY', 'SomeRandomString'),
'cipher' => 'AES-256-CBC',
'log' => 'single',

'providers' => [

    /*
     * Laravel Framework Service Providers...
     */
    Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
    Illuminate\Auth\AuthServiceProvider::class,
    Illuminate\Broadcasting\BroadcastServiceProvider::class,
    Illuminate\Bus\BusServiceProvider::class,
    Illuminate\Cache\CacheServiceProvider::class,
    Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
    Illuminate\Routing\ControllerServiceProvider::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...
     */

    App\Providers\AppServiceProvider::class,
    App\Providers\EventServiceProvider::class,
    App\Providers\RouteServiceProvider::class,

    /*
     * Addons Service Providers...
     */

    Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
    Folklore\Image\ImageServiceProvider::class,
    Thujohn\Twitter\TwitterServiceProvider::class,
    SammyK\LaravelFacebookSdk\LaravelFacebookSdkServiceProvider::class,
    SimpleSoftwareIO\QrCode\QrCodeServiceProvider::class

],


'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,
    'Bus'       => Illuminate\Support\Facades\Bus::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,
    'Hash'      => Illuminate\Support\Facades\Hash::class,
    'Input'     => Illuminate\Support\Facades\Input::class,
    'Inspiring' => Illuminate\Foundation\Inspiring::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,
    'JWTAuth'   => Tymon\JWTAuth\Facades\JWTAuth::class,
    'JWTFactory'=> Tymon\JWTAuth\Facades\JWTFactory::class,
    'Image'     => Folklore\Image\Facades\Image::class,
    'Twitter'   => Thujohn\Twitter\Facades\Twitter::class,
    'Facebook'  => SammyK\LaravelFacebookSdk\FacebookFacade::class,
    'QrCode'    => SimpleSoftwareIO\QrCode\Facades\QrCode::class

],

Any idea what could be causing this issue? All my other facades are working as expected except for this one. Thanks!

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!

QRcode - Bitcoin payment

Please add QRcode Bitcoin

$addr - Bitcoin address (12A1MyfXbW6RhdRAZEqofac5jCQQjwEPBu)
$amount - 0.000377
$label - Test
$message - HelloWorld
$req - url request (https://bitpay.com/i/HztrqbJH3piKUskxkBfr8b)

Example - QrCode::BTC($addr, $amount, $label, $message, $req);

out:
bitcoin:12A1MyfXbW6RhdRAZEqofac5jCQQjwEPBu?amount=0.000377&message=HelloWorld&label=Test&r=https://bitpay.com/i/HztrqbJH3piKUskxkBfr8b

https://bitco.in/en/developer-examples#payment-protocol
https://en.bitcoin.it/wiki/BIP_0021

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.