PHP code example of endroid / qr-code-bundle

1. Go to this page and download the library: Download endroid/qr-code-bundle 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/ */

    

endroid / qr-code-bundle example snippets


use Endroid\QrCode\Builder\BuilderInterface;

public function __construct(BuilderInterface $customQrCodeBuilder)
{
    $result = $customQrCodeBuilder
        ->size(400)
        ->margin(20)
        ->build();
}

use Endroid\QrCodeBundle\Response\QrCodeResponse;

$response = new QrCodeResponse($result);