Support the ongoing development of Laravel.io →
Configuration Requests Installation
Last updated 1 year ago.
0

Just solved my problem.

For future reference here's my code

$app->get('/', function () use ($app) {

$qr_code = new QrCode();
$image = $qr_code->setText("José Camilo Fernandes Coelho")
				->setSize(300)
				->setPadding(10)
				->setErrorCorrection('high')
				->setImageType('png');

$content = $image->get("png");

return response($content)
	->header('Content-Type','image/png')
	->header('Pragma','public')
	->header('Content-Disposition','inline; filename="qrcodeimg.png"')
	->header('Cache-Control','max-age=60, must-revalidate');

});
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jcamilo93 jcamilo93 Joined 27 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.