generate($url))."\">";return response()->stream(function() use($resu。Laravel实时生成图片。" />
- 首页 > it技术 > >
public function generateQRCode($id){
$result = SenceQrcodeInfo::find($id,['qrcode_content','id']);
$url = "http://weixin.qq.com/q/02_lvVoNRJe7h10000003X";
//echo "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"]);
}
推荐阅读