PHP code example of decorate / qr_manager

1. Go to this page and download the library: Download decorate/qr_manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

decorate / qr_manager example snippets



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]);

#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();
html
<div>
    {!! $data !!}
</div>