composer require decorate/qr_manager
<?php
use Decorate\QR_Manager;
#controller
$user = User::query()->select(['id', 'name'])->first();
$qr = new QR_Manager($user);
$res = $qr->size(200)->show();
return view('index', ['data' => $res]);
<div>
{!! $data !!}
</div>
#controller
$user = User::query()->select(['id', 'name'])->first();
$qr = new QR_Manager();
return $qr
->source($user)
->format('png')
->size(200)
->download('filename');
#controller
$user = User::query()->select(['id', 'name'])->first();
$qr = new QR_Manager();
return $qr
->source($user)
->format('png')
->size(200)
->toBase64();
methods | args | output |
---|---|---|
source | Model or string | this |
format | string | this |
size | string | this |
show | null | HtmlString |
download | null | \Illuminate\Http\Response |
toBase64 | null | string |