Laravel实时生成图片
作者:
sunnyye | 来源:发表于
2018-01-26 13:47 被阅读0次public function generateQRCode($id){
$result = SenceQrcodeInfo::find($id,['qrcode_content','id']);
$url = "http://weixin.qq.com/q/02_lvVoNRJe7h10000003X";
//echo "<img src=\"data:image/png;base64,".base64_encode(QrCode::format('png')->size(300)->generate($url))."\">";
return response()->stream(function() use($result){
echo QrCode::format('png')->size(200)->generate($result->qrcode_content);
}, 200, ["Content-type"=>"image/png","Content-Disposition"=>"attachment; filename=hello.png"]);
}
本文标题:Laravel实时生成图片
本文链接:https://www.haomeiwen.com/subject/dfaiaxtx.html
网友评论