Skip to content

decorate/qr_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR_Manager

install

composer require decorate/qr_manager

usage

<?php
use Decorate\QR_Manager;

QRコード表示

#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>

QRコードダウンロード

#controller
$user = User::query()->select(['id', 'name'])->first();
$qr = new QR_Manager();
return $qr
    ->source($user)
    ->format('png')
    ->size(200)
    ->download('filename');

QRコードbase64

#controller
$user = User::query()->select(['id', 'name'])->first();
$qr = new QR_Manager();
return $qr
    ->source($user)
    ->format('png')
    ->size(200)
    ->toBase64();

Class Methods

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published