simplesoftwareio / simple-qrcode Goto Github PK
View Code? Open in Web Editor NEWAn easy-to-use PHP QrCode generator with first-party support for Laravel.
Home Page: https://www.simplesoftware.io/simple-qrcode
License: MIT License
An easy-to-use PHP QrCode generator with first-party support for Laravel.
Home Page: https://www.simplesoftware.io/simple-qrcode
License: MIT License
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?
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 ;)
Currently logos overlaid on top QR code :(
Will support excavate the logo ?
To the output we get this: http://imgur.com/a/XL2iO
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'); }
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?
I'm using QrCode from Laravel. And it always 29px * 29px not depenpding of what size I specify. It happens both for PNG and SVG
Hello,
10xxxx, Lior :)
Will patterns support ?
Example img - site Scanova.io
Out qr - img
You can also look on the website: https://www.unitag.io/qrcode
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>
Is there a way to implement a logo to the qrcode? I need this for my compay website :(
Kind regards
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
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?
Looking for a kind soul to translate our documents into Japanese .
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/ja/README.md
We will place your name into our thank you section within the change log!
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?
This is 2 way is used
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)); }} ">
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: ...)
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!
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?
Is it possible to upload the QRCode to Amazon S3 without saving to the webserver first?
Excuse me, how to solve this?
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!
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 ?
GREAT library! Really good job.
What about caching? I guess you could easily cache the QR Codes sorely by its value?
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!
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.
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
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.
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?
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)
Looking for a kind soul to translate our documents into Portuguese.
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/pt/README.md
We will place your name into our thank you section within the change log!
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
Follow all the steps in app.php
In my Controller added (without instructions) in __construct():
$this->middleware('qrcode');
in my view:
{{ QrCode::generate('Make me into a QrCode!'); }}
and i have error in log:
FatalErrorException in Pipeline.php line 125:
Call to undefined method SimpleSoftwareIO\QrCode\BaconQrCodeGenerator::handle()
Looking for a kind soul to translate our documents into Spanish.
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/es/README.md
We will place your name into our thank you section within the change log!
wen I use QrCode::generate('Make me into a QrCode!')
got this:
Call to undefined method SimpleSoftwareIO\QrCode\Facades\QrCode::generate()
Is it possible not just to render the QR code but actually return a file download from it in Laravel 4.x?
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()
But First of all, I need a success trial ^_^
Looking for a kind soul to translate our documents into Korean.
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/ko/README.md
We will place your name into our thank you section within the change log!
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!
I used to in other project used this plugin, but now I'm in a new project in this mistake.What is the meaning of this?
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
Looking for a kind soul to translate our documents into Hindi.
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/hi/README.md
We will place your name into our thank you section within the change log!
Looking for a kind soul to translate our documents into French.
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/fr/README.md
We will place your name into our thank you section within the change log!
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!
Looking for a kind soul to translate our documents into Italian.
Translate: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/en/README.md
Place new file here: https://github.com/SimpleSoftwareIO/simple-qrcode/blob/develop/docs/it/README.md
We will place your name into our thank you section within the change log!
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>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.