src/Google2FA.php
public function getQRCodeInlineV1($company, $holder, $secret, $size = 200, $encoding = 'utf-8')
    {
        $url = $this->getQRCodeUrl($company, $holder, $secret);

        $renderer = $this->imageBackEnd;
        $renderer->setWidth($size);
        $renderer->setHeight($size);

        $bacon = new BaconQrCodeWriter($renderer);
        $data = $bacon->writeString($url, $encoding);

        if ($this->imageBackEnd instanceof Png) {
            return 'data:image/png;base64,'.base64_encode($data);
        }
        return $data;
    }
public function getQRCodeInlineV1($company, $holder, $secret, $size = 200, $encoding = 'utf-8')
    {
        $url = $this->getQRCodeUrl($company, $holder, $secret);

        $renderer = $this->imageBackEnd;
        $renderer->setWidth($size);
        $renderer->setHeight($size);

        $bacon = new BaconQrCodeWriter($renderer);
        $data = $bacon->writeString($url, $encoding);

        if ($this->imageBackEnd instanceof Png) {
            return 'data:image/png;base64,'.base64_encode($data);
        }
        return $data;
    }
public function getQRCodeInlineV1 ( $ company , $ holder , $ secret , $ size = 200 , $ encoding = 'utf-8' ) { $ url = $ this -> getQRCodeUrl ( $ company , $ holder , $ secret ) ; $ renderer = $ this -> imageBackEnd ; $ renderer -> setWidth ( $ size ) ; $ renderer -> setHeight ( $ size ) ; $ bacon = new BaconQrCodeWriter ( $ renderer ) ; $ data = $ bacon -> writeString ( $ url , $ encoding ) ; if ( $ this -> imageBackEnd instanceof Png ) { return 'data:image/png;base64,' . base64_encode ( $ data ) ; } return $ data ; }
Generates a QR code data url to display inline for Bacon QRCode v1

@param string $company
@param string $holder
@param string $secret
@param int    $size
@param string $encoding Default to UTF-8

@return string
Generates a QR code data url to display inline for Bacon QRCode v1