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');
});
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community