Laravel生成二维码图片
composer下载组件
https://github.com/SimpleSoftwareIO/simple-qrcode/tree/develop/docs/zh-cn
composer require simplesoftwareio/simple-qrcode "~2"
namespace App\Http\Controllers;use SimpleSoftwareIO\QrCode\Facades\QrCode;class HomeController extends Controller
{public function hello(){return "laravel7";}public function generatePicture(){$res= QrCode::format('png')->margin(1)->size(399)->color(40,40,40)->generate('Make me a QrCode!');return response()->make($res)->header('Content-Type','image/png');}}Route::get('home/generatePicture','HomeController@generatePicture');